The coding of line orientation in the visual system has been investigated extensively. During the prolonged viewing of a stimulus, the perceived orientation continuously changes (normalization effect). Also, the orientation of the adapting stimulus and the background stimuli influence the perceived orientation of the subsequently displayed stimulus: tilt after-effect (TAE) or tilt illusion (TI). The neural mechanisms of these effects are not fully understood. The proposed model includes many local analyzers, each consisting of two sets of neurons. The first set has two independent cardinal detectors (CDs), whose responses depend on stimulus orientation. The second set has many orientation detectors (OD) tuned to different orientations of the stimulus. The ODs sum up the responses of the two CDs with respective weightings and output a preferred orientation depending on the ratio of CD responses. It is suggested that during prolonged viewing, the responses of the CDs decrease: the greater the excitation of the detector, the more rapid the decrease in its response. Thereby, the ratio of CD responses changes during the adaptation, causing the normalization effect and the TAE. The CDs of the different local analyzers laterally inhibit each other and cause the TI. We show that the properties of this model are consistent with both psychophysical and neurophysiological findings related to the properties of orientation perception, and we investigate how these mechanisms can affect the orientation's sensitivity.