A computer-implemented method of assigning view numbers to display elements of an autostereoscopic display for use in interleaving image data of different viewpoints of a scene on the basis of said assigned view numbers, the autostereoscopic display comprising: a display panel comprising an array of display elements; and an array of elongated optical elements for redirecting light emitted by the display elements in mutually different directions, the optical elements being arranged substantially in parallel at a pitch distance p and oriented with their main longitudinal axis at a slant s to a column direction of the array of display elements, the method comprising: determining a phase for a respective display element (210, 220) to be used in the assignment of the view number, wherein the phase is representative of a relative horizontal position of the respective display element with respect to an optical element redirecting the light emitted by the respective display element and is thereby indicative of a direction in which the light is redirected, wherein the phase is determined as a delta with respect to the phase of a preceding display element at a horizontal position x and a vertical position y in the array of display elements in accordance with: phase x + 1, y = phase x, y + h % t phase x, y + 1 = phase x, y + v % t wherein h represents a horizontal delta in phase per display element, wherein v represents a vertical delta in phase per display element, wherein t represents a total number of phases and wherein % is a functional representation of a modulo operation, wherein values of h, v and t are selected as integer values which approximate the pitch distance p and the slant s in accordance with p ≈ t h and s ≈ v h so that the approximation error in the phase over the width and height of the array of display elements accumulates to less than the pitch distance p; and determining the view number from said determined phase based on a number of most significant digits of a numerical representation of the phase. a display panel comprising an array of display elements; and an array of elongated optical elements for redirecting light emitted by the display elements in mutually different directions, the optical elements being arranged substantially in parallel at a pitch distance p and oriented with their main longitudinal axis at a slant s to a column direction of the array of display elements, the method comprising: determining a phase for a respective display element (210, 220) to be used in the assignment of the view number, wherein the phase is representative of a relative horizontal position of the respective display element with respect to an optical element redirecting the light emitted by the respective display element and is thereby indicative of a direction in which the light is redirected, wherein the phase is determined as a delta with respect to the phase of a preceding display element at a horizontal position x and a vertical position y in the array of display elements in accordance with: phase x + 1, y = phase x, y + h % t phase x, y + 1 = phase x, y + v % t wherein h represents a horizontal delta in phase per display element, wherein v represents a vertical delta in phase per display element, wherein t represents a total number of phases and wherein % is a functional representation of a modulo operation, wherein values of h, v and t are selected as integer values which approximate the pitch distance p and the slant s in accordance with p ≈ t h and s ≈ v h so that the approximation error in the phase over the width and height of the array of display elements accumulates to less than the pitch distance p; and determining the view number from said determined phase based on a number of most significant digits of a numerical representation of the phase. determining a phase for a respective display element (210, 220) to be used in the assignment of the view number, wherein the phase is representative of a relative horizontal position of the respective display element with respect to an optical element redirecting the light emitted by the respective display element and is thereby indicative of a direction in which the light is redirected, wherein the phase is determined as a delta with respect to the phase of a preceding display element at a horizontal position x and a vertical position y in the array of display elements in accordance with: phase x + 1, y = phase x, y + h % t phase x, y + 1 = phase x, y + v % t wherein h represents a horizontal delta in phase per display element, wherein v represents a vertical delta in phase per display element, wherein t represents a total number of phases and wherein % is a functional representation of a modulo operation, wherein values of h, v and t are selected as integer values which approximate the pitch distance p and the slant s in accordance with p ≈ t h and s ≈ v h so that the approximation error in the phase over the width and height of the array of display elements accumulates to less than the pitch distance p; and determining the view number from said determined phase based on a number of most significant digits of a numerical representation of the phase.