[go: up one dir, main page]

RU2298292C2 - System and method for scanning - Google Patents

System and method for scanning Download PDF

Info

Publication number
RU2298292C2
RU2298292C2 RU2004129644/09A RU2004129644A RU2298292C2 RU 2298292 C2 RU2298292 C2 RU 2298292C2 RU 2004129644/09 A RU2004129644/09 A RU 2004129644/09A RU 2004129644 A RU2004129644 A RU 2004129644A RU 2298292 C2 RU2298292 C2 RU 2298292C2
Authority
RU
Russia
Prior art keywords
document
scanner
binding
camera
substrate
Prior art date
Application number
RU2004129644/09A
Other languages
Russian (ru)
Other versions
RU2004129644A (en
Inventor
Михаил Николаевич Рычагов (RU)
Михаил Николаевич Рычагов
Иль Владимирович Сафонов (RU)
Илья Владимирович Сафонов
Original Assignee
Самсунг Электроникс Ко., Лтд.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Самсунг Электроникс Ко., Лтд. filed Critical Самсунг Электроникс Ко., Лтд.
Priority to RU2004129644/09A priority Critical patent/RU2298292C2/en
Publication of RU2004129644A publication Critical patent/RU2004129644A/en
Application granted granted Critical
Publication of RU2298292C2 publication Critical patent/RU2298292C2/en

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

FIELD: systems and methods for scanning, primarily, objects in binding.
SUBSTANCE: system for scanning primarily bound objects includes, interconnected by data bus: scanner, digital camera, processor, program memory block, block for memorizing given parameters of documents and external displaying device, while objective of camera is facing end side of object, program memory block contains correction means, made with possible determining of parameters and method for image correction, processor has distortion correction module, made with possible analysis of object image, received from camera, and also correction of distortions of scanned image of object close to binding by determining and processing parameters, characterizing shape of bending of object pages close to binding.
EFFECT: high speed correction of geometric distortions of object in binding area with maximal usage of standard office equipment like scanners and digital cameras.
2 cl, 9 dwg

Description

Изобретение относится к системам и способам сканирования и копирования преимущественно для объектов в переплете.The invention relates to systems and methods for scanning and copying mainly for objects in binding.

При сканировании объекта в переплете практически невозможно получить отсканированное изображение без искажений геометрических параметров (дисторсии) и затемнения текста в области переплета. В связи с этим в настоящее время актуальна проблема коррекции искажений в отсканированных изображениях, особенно в текстовых, в частности, с целью последующего распознавания текста, поскольку системы распознания текста могут работать только с неискаженным изображением текста.When scanning an object in binding, it is practically impossible to obtain a scanned image without distortion of geometric parameters (distortion) and darkening of the text in the binding area. In this regard, the problem of correcting distortions in scanned images, especially in text ones, is currently relevant, in particular for the purpose of subsequent text recognition, since text recognition systems can only work with an undistorted image of text.

При сканировании объектов в переплете, например книг, или объектов с неровной поверхностью искажения в отсканированном изображении объекта, а именно дисторсия и затемнение текста возникают в основном в области переплета и вызваны неплотным прилеганием поверхности сканируемого объекта к подложке сканера, вдоль которой сканируется объект.When scanning objects in binding, such as books, or objects with an uneven surface, distortions in the scanned image of the object, namely distortion and darkening of the text, occur mainly in the binding area and are caused by a loose fit of the surface of the scanned object to the scanner substrate along which the object is scanned.

Существуют различные способы устранения указанных выше искажений, возникающих при сканировании. Способы устранения искажений делятся на аппаратные, в которых воздействуют на сам сканируемый объект, и алгоритмические, которые основаны на коррекции отсканированного изображения объекта.There are various ways to eliminate the above distortions that occur during scanning. The methods for eliminating distortions are divided into hardware, in which they affect the scanned object itself, and algorithmic, which are based on the correction of the scanned image of the object.

В аппаратных способах в основном используются различные механические приспособления, позволяющие плотно прижать сканируемый объект к подложке, вдоль которой он сканируется. При этом существует опасность повреждения объекта. В алгоритмических системах и способах, к которым относится заявленное изобретение, области с искажением определяют либо путем анализа отсканированного изображения объекта, либо на основе данных дополнительных сенсоров, определяющих высоту зазора между сканируемым объектом и подложкой сканера. Причем во многих случаях применение дополнительных сенсоров требует двойного прохода сканирующей системы вдоль документа, что увеличивает время сканирования.In hardware methods, various mechanical devices are mainly used, which allow the object to be pressed tightly against the substrate along which it is scanned. There is a risk of damage to the object. In the algorithmic systems and methods to which the claimed invention relates, areas with distortion are determined either by analyzing the scanned image of the object, or based on data from additional sensors that determine the height of the gap between the scanned object and the scanner substrate. Moreover, in many cases, the use of additional sensors requires a double pass of the scanning system along the document, which increases the scanning time.

В патенте США №6330050 описано устройство для коррекции искажений, возникающих в районе переплета открытой книги при сканировании. Устройство содержит средство сканирования, память, средство коррекции искажений, выполненное с возможностью определения области искажений в отсканированном изображении объекта в районе переплета книги без применения дополнительных детекторов расстояния и коррекции изображения. Недостатком устройства является низкая точность определения области искажений и корректирующая способность, кроме того, устройство предполагает использование значительных ресурсов памяти.US Pat. No. 6,330,050 describes a device for correcting distortions arising in the binding area of an open book during scanning. The device comprises a scanning tool, a memory, a distortion correction tool, configured to determine a distortion region in a scanned image of an object in the binding area of a book without using additional distance detectors and image correction. The disadvantage of this device is the low accuracy of determining the area of distortion and corrective ability, in addition, the device involves the use of significant memory resources.

В опубликованной заявке США №2002/0085248 предложен способ коррекции отсканированного изображения, в котором сканируют неровный объект. В способе определяют данные отсканированного изображения объекта, анализируют данные отсканированного изображения объекта, при этом определяют области искажений, возникающие в неровных местах, где объект неплотно прилегает к подложке сканера, и данные для корректировки области искажений изображения объекта. После чего восстанавливают яркость изображения в области искажений, используя данные для корректировки. Данный способ выбран в качестве прототипа заявленного изобретения.US Published Application No. 2002/0085248 proposes a method for correcting a scanned image in which an uneven object is scanned. The method determines the data of the scanned image of the object, analyzes the data of the scanned image of the object, while determining the areas of distortion that occur in uneven places where the object does not fit snugly on the scanner substrate, and data for adjusting the area of distortion of the image of the object. Then restore the brightness of the image in the distortion region, using the data for correction. This method is selected as a prototype of the claimed invention.

Недостатком прототипа является низкая точность определения областей искажений изображения и невозможность корректировки геометрических искажений и резкости изображения объекта, возникающих в областях искажений. Кроме того, способ прототипа не позволяет определять области искажений изображения объекта и данные для корректировки области искажений непосредственно при сканировании, что увеличивает время выполнения способа.The disadvantage of the prototype is the low accuracy of determining the areas of distortion of the image and the inability to adjust geometric distortions and sharpness of the image of the object that occur in the areas of distortion. In addition, the prototype method does not allow to determine the distortion region of the image of the object and the data for adjusting the distortion region directly during scanning, which increases the execution time of the method.

Задачей заявленного изобретения является создание системы и способа сканирования и копирования преимущественно для объекта в переплете, позволяющих осуществлять высокоскоростную коррекцию геометрических искажений объекта в области переплета при максимальном использовании стандартного офисного оборудования типа сканеров и цифровых фотокамер.The objective of the claimed invention is to provide a system and method for scanning and copying mainly for an object in binding, allowing for high-speed correction of geometric distortions of an object in the binding area with the maximum use of standard office equipment such as scanners and digital cameras.

Технический результат достигается за счет использования такой системы, которая содержит связанные между собой шиной данных сканер, цифровую камеру, процессор, блок памяти программ, блок памяти данных и внешнее отображающее устройство, при этом сканер имеет подложку, на которой размещается и вдоль которой сканируется объект, а цифровая камера расположена на одной из боковых сторон сканера таким образом, что объектив камеры направлен на торец переплета в месте изгиба раскрытых страниц, блок памяти программ содержит средство коррекции, выполненное с возможностью установления параметров и способа коррекции изображения, процессор имеет модуль коррекции искажений, выполненный с возможностью анализа снимка объекта, полученного с камеры, а также коррекции искажений отсканированного изображения объекта вблизи переплета путем определения и обработки данных, характеризующих форму изгиба страниц объекта вблизи переплета в соответствии с параметрами и способом коррекции.The technical result is achieved through the use of such a system that contains a scanner connected to each other by a data bus, a digital camera, a processor, a program memory block, a data memory block and an external display device, while the scanner has a substrate on which the object is located and along which it is scanned, and the digital camera is located on one of the sides of the scanner in such a way that the camera lens is aimed at the end of the binding at the bend of the opened pages, the program memory contains correction means, you Completed with the ability to set parameters and an image correction method, the processor has a distortion correction module, configured to analyze the image of the object received from the camera, as well as correct distortions of the scanned image of the object near the binding by determining and processing data characterizing the shape of the bending of the pages of the object near the binding in compliance with the parameters and correction method.

Для функционирования системы существенно, чтобы сканер был планшетным.For the functioning of the system, it is essential that the scanner is a tablet.

Для функционирования системы важно, чтобы подложка сканера была выполнена из стекла или другого прозрачного материала.For the system to function, it is important that the scanner backing is made of glass or other transparent material.

Для функционирования системы необходимо, чтобы объект сканирования размещался на подложке в развернутом виде, причем страницы объекта были прижаты к подложке.For the system to function, it is necessary that the scan object is placed on the substrate in expanded form, and the pages of the object are pressed against the substrate.

Для функционирования системы существенно, чтобы объект сканирования размещался на подложке сканера таким образом, чтобы края страниц объекта были расположены параллельно границам подложки сканера.For the system to function, it is essential that the scan object is placed on the scanner substrate so that the edges of the object pages are parallel to the borders of the scanner substrate.

Для функционирования системы имеет смысл, чтобы рядом с камерой было расположено, по меньшей мере, одно осветительное устройство, выполненное с возможностью включения во время съемки для освещения объекта со стороны камеры.For the functioning of the system, it makes sense that at least one lighting device is arranged next to the camera, configured to be turned on during shooting to illuminate the object from the side of the camera.

Для функционирования системы важно, чтобы камера была встроена в корпус сканера или подсоединялась к сканеру на момент сканирования объекта.For the functioning of the system, it is important that the camera is built into the scanner body or connected to the scanner at the time of scanning the object.

Для функционирования системы существенно, чтобы оптическая ось камеры была расположена под углом от 0 до 60 градусов к плоскости подложки сканера.For the system to function, it is essential that the optical axis of the camera is located at an angle from 0 to 60 degrees to the plane of the scanner substrate.

Для функционирования системы необходимо, чтобы в качестве внешнего устройства система содержала, по меньшей мере, одно устройство, выбранное из группы, включающей монитор, принтер, компьютер или другие аналогичные устройства.For the functioning of the system, it is necessary that, as an external device, the system contains at least one device selected from the group including a monitor, printer, computer, or other similar devices.

Поставленная задача достигается также путем создания способа сканирования и копирования, который включает в себя следующие операции:The task is also achieved by creating a method of scanning and copying, which includes the following operations:

- снимают цифровой камерой торцевую часть объекта;- remove the end part of the object with a digital camera;

- записывают полученный снимок торцевой части объекта в блок памяти данных;- record the received image of the end part of the object in the data memory block;

- анализируют в модуле коррекции искажений процессора наличие искажений в записи снимка в соответствии с параметрами, полученными из средства коррекции, при этом определяют имеет ли объект искажения вблизи переплета, в случае если объект не имеет искажений вблизи переплета, сканируют объект сканером и выводят изображение объекта на внешнее устройство, в случае если объект имеет искажения вблизи переплета, определяют и сохраняют в блоке памяти данных параметры, характеризующие форму изгиба страниц объекта вблизи переплета;- analyze the presence of distortions in the image recording in the processor distortion correction module in accordance with the parameters obtained from the correction means, while determining whether the object has distortions near the binding, if the object has no distortions near the binding, scan the object with a scanner and display the image of the object on an external device, if the object has distortions near the binding, the parameters characterizing the shape of the bending of the pages of the object near the binding are determined and stored in the data memory block;

- сканируют объект сканером;- scan the object with a scanner;

- записывают отсканированное изображение объекта в блок памяти данных;- write the scanned image of the object in the data memory block;

- корректируют в модуле коррекции искажений искажения отсканированного изображения объекта, сохраненного в блоке памяти данных, в соответствии с параметрами и способом коррекции, установленными в средстве коррекции, при этом используют данные, характеризующие форму изгиба страниц объекта вблизи переплета;- correct in the distortion correction module the distortion of the scanned image of the object stored in the data memory unit, in accordance with the parameters and the correction method set in the correction tool, using data characterizing the shape of the bending pages of the object near the binding;

- записывают скорректированное отсканированное изображение объекта в блок памяти данных и выводят его на внешнее устройство.- record the corrected scanned image of the object in the data memory block and output it to an external device.

Для функционирования способа существенно, чтобы объект снимали цифровой камерой, при этом освещали объект, по меньшей мере, одним осветительным устройством со стороны камеры.For the operation of the method, it is essential that the object was shot with a digital camera, while illuminating the object with at least one lighting device from the side of the camera.

Для функционирования способа важно, чтобы снимок объекта, сохраненный в блоке памяти данных, анализировали в модуле коррекции искажений процессора, при этом вводили систему координат кадра объекта, снятого камерой XсZc, ось Хс которой направлена параллельно, а ось Zc - перпендикулярно подложке, в системе координат кадра объекта, снятого камерой, задавали массив точек на подложке сканера, отстоящих друг от друга на равное расстояние, и определяли координаты {xc(i)} каждой точки массива на подложке сканера, для всех точек массива с координатами {xc(i)} определяли массив расстояний {h(i)} от каждой точки на подложке сканера zc=0 до ее проекции на странице объекта, в результате получали массив пар точек {xc(i), h(i)}, определяли координату xс0, соответствующую максимуму массива расстояний (абсциссу максимума):It is important for the functioning of the method to a picture object stored in the data memory unit, analyzed in a module processor distortion correction, the injected frame coordinate system of the object captured by the camera X c Z c, X-axis which is parallel to, and Z c axis - perpendicular the array, points in the frame coordinate system of the object captured by the camera were assigned an array of points on the scanner substrate that were equally spaced from each other, and the coordinates {x c (i)} of each array point on the scanner substrate were determined for all points in the array with coordinate we {x c (i)} determined the array of distances {h (i)} from each point on the scanner substrate z c = 0 to its projection on the object page, as a result, we obtained an array of pairs of points {x c (i), h (i )}, we determined the coordinate x с0 corresponding to the maximum of the array of distances (the abscissa of the maximum):

xc0:h(xc0)=max{h(i)},x c0 : h (x c0 ) = max {h (i)},

анализировали характер массива {xc(i), h(i)} слева и справа от xc0 и определяли имеет ли объект искажения вблизи переплета или нет.analyzed the nature of the array {x c (i), h (i)} to the left and right of x c0 and determined whether the object has distortions near the binding or not.

Для функционирования способа существенно, чтобы при наличии у объекта искажений вблизи переплета определяли данные, характеризующие форму изгиба страниц объекта вблизи переплета, при этом массив {xc(i), h(i)} преобразовывали в два массива координат {xc(j), zca(j)} и {xc(j), zcb(j)}, вводили систему координат сканера XsZs, оси которой совпадают с осями системы координат кадра объекта, снятого камерой XcZc, массивы координат {xc(j), zca(j)} и {xc(j), zcb(j)} преобразовывали (конвертировали) в систему координат сканера XsZs:For the method to function, it is essential that if the object has distortions near the binding, the data characterizing the shape of the bending of the object pages near the binding is determined, while the array {x c (i), h (i)} is converted into two coordinate arrays {x c (j) , z ca (j)} and {x c (j), z cb (j)}, introduced the scanner coordinate system X s Z s whose axes coincide with the axes of the coordinate system of the frame of the object captured by the camera X c Z c , coordinate arrays {x c (j), z ca (j)} and {x c (j), z cb (j)} converted (converted) into the scanner coordinate system X s Z s :

Figure 00000002
Figure 00000002

где

Figure 00000003
согласует разрешение камеры и сканера по оси X, d согласует разрешение камеры и сканера по оси Z, а также учитывали угол наклона камеры к подложке, где tx переносит начало системы координат, в результате получали массивы координат {xsa(j), zsa(j)} из n элементов и {xsb(j), zsb(j)} из m элементов, определяющие форму изгиба страниц объекта вблизи переплета.Where
Figure 00000003
matches the resolution of the camera and scanner along the X axis, d matches the resolution of the camera and scanner along the Z axis, and also took into account the angle of inclination of the camera to the substrate, where tx transfers the origin of the coordinate system, as a result we got coordinate arrays {x sa (j), z sa ( j)} of n elements and {x sb (j), z sb (j)} of m elements, which determine the form of bending of the pages of the object near the binding.

Для функционирования способа важно, чтобы корректировали в модуле коррекции искажений процессора искажения отсканированного изображения объекта, при этом корректировали дисторсию и тень в области изгиба страниц изображения объекта.For the method to function, it is important that the distortion correction module of the processor corrects the distortion of the scanned image of the object, while correcting the distortion and shadow in the bending area of the pages of the image of the object.

Для функционирования способа необходимо, чтобы корректировали в модуле коррекции искажений искажения отсканированного изображения объекта, при этом использовали кусочно-линейную интерполяцию по массивам координат {xsa(j), zsa(j)} и {xsb(j), zsb(j)}, полагали, что количество пикселов каждой строки скорректированного отсканированного изображения объекта превосходит количество пикселов отсканированного изображения на величину Delta, которую задавали следующей зависимостью:For the method to function, it is necessary that the distortion correction module corrects the distortions of the scanned image of the object, using piecewise linear interpolation over the coordinate arrays {x sa (j), z sa (j)} and {x sb (j), z sb ( j)}, it was believed that the number of pixels of each row of the corrected scanned image of the object exceeds the number of pixels of the scanned image by the value of Delta, which was specified by the following dependence:

Delta=round(La+Lb-(xsb(m)-xsa(n))),Delta = round (L a + L b - (x sb (m) -x sa (n))),

где round - функция округления до ближайшего целого, La и Lb - суммарные длины интерполирующих отрезков, что соответствует количеству пикселов изогнутых частей страниц, при этом La и Lb задают следующей зависимостью:where round is the function of rounding to the nearest integer, L a and L b are the total lengths of the interpolating segments, which corresponds to the number of pixels of the curved parts of the pages, while L a and L b are given by the following dependence:

Figure 00000004
Figure 00000004

Figure 00000005
Figure 00000005

для коррекции дисторсии вдоль интерполированной кривой, образованной сечением изогнутой поверхности страницы объекта, отсчеты выбирали с шагом в единицу длины системы координат сканера, в результате чего определяли соответствующую координату xs', по которой из сканированного изображения вычисляют значения цветовых составляющих R'G'B' скорректированного изображения путем линейной интерполяции по значениям цветовых составляющих пикселов RGB сканированного изображения с координатами floor(xs') и floor(xs')+1, где floor - функция взятия целой части:to correct distortion along the interpolated curve formed by the cross section of the curved surface of the page of the object, the samples were selected in increments of a unit length of the scanner coordinate system, as a result of which the corresponding coordinate x s 'was determined, from which the color components of R'G'B' were calculated from the scanned image corrected image by linear interpolation according to the values of the color components of the RGB pixels of the scanned image with the coordinates floor (x s ') and floor (x s ') +1, where floor is the function of taking the integer part:

R'=R(floor(xs'),y)+(xs'-floor(xs'))*R(floor(xs')+1,y),R '= R (floor (x s '), y) + (x s ' -floor (x s ')) * R (floor (x s ') + 1, y),

для значения G' и В' вычисляли аналогично, текущие координаты отсчетов (xs', zs') вдоль интерполированной отрезками кривой вычисляют по параметрическим уравнениям отрезков прямой от точки с координатами (xsa(i), zsa(i)) до (xsa(i-1), zsa(i-1)), i=2...n:for the values of G 'and B' was calculated similarly, the current coordinates of the samples (x s ', z s ') along the curve interpolated by the segments are calculated according to the parametric equations of the segments of the straight line from the point with coordinates (x sa (i), z sa (i)) to (x sa (i-1), z sa (i-1)), i = 2 ... n:

xs'=xsa(i)+t*(xsa(i-1)-xsa(i)),x s ' = x sa (i) + t * (x sa (i-1) -x sa (i)),

zs'=zsa(i)+t*(zsa(i-1)-zsa(i)),z s ' = z sa (i) + t * (z sa (i-1) -z sa (i)),

где t=0 в начале отрезка (точка (xsa(i), zsa(i)), t=1 в конце отрезка (точка (xsa(i-1), zsa(i-1)), а шаг изменения t задавали выражением:where t = 0 at the beginning of the segment (point (x sa (i), z sa (i)), t = 1 at the end of the segment (point (x sa (i-1), z sa (i-1)), and the change step t was set by the expression:

Figure 00000006
Figure 00000006

вычисления текущих координат отсчетов (xs', zs') вдоль интерполированной кривой для массива {xsb(j), zsb(j)} производили аналогично, устанавливали экспериментально усредненную зависимость яркости искаженного пиксела от яркости исходного пиксела и расстояния до проекции этого пиксела на странице от подложки сканера, далее эту зависимость преобразовывали в функцию коррекции искажений отсканированного изображения объекта, учитывающую также и разрешение сканирования:the current coordinates of the samples (x s ', z s ') were calculated along the interpolated curve for the array {x sb (j), z sb (j)} in the same way, the experimentally averaged dependence of the brightness of the distorted pixel on the brightness of the original pixel and the distance to the projection of this pixels on the page from the scanner substrate, then this dependence was converted into a distortion correction function of the scanned image of the object, which also takes into account the scanning resolution:

Y'(x,у)=f(Y(xs',у),zs'),Y '(x, y) = f (Y (x s ', y), z s '),

где Y'(x, у) - яркость скорректированного пиксела, Y(xs', y) - яркость пиксела сканированного изображения, zs' - расстояния до страницы от подложки сканера в xs'.where Y '(x, y) is the brightness of the adjusted pixel, Y (x s ', y) is the pixel brightness of the scanned image, z s 'is the distance to the page from the scanner substrate in x s '.

Для функционирования способа существенно, чтобы в модуле коррекции корректировали искажения отсканированного изображения объекта, при этом корректировали искажения в каждой строке сканированного изображения независимо от других строк.For the method to function, it is essential that the distortion module corrects the distortions of the scanned image of the object, while correcting the distortions in each line of the scanned image, regardless of the other lines.

Для более глубокого понимания заявленного изобретения далее приводятся его подробное описание и чертежи.For a deeper understanding of the claimed invention, the following is a detailed description and drawings.

Фиг.1. Блок-схема системы сканирования и копирования согласно изобретению.Figure 1. Block diagram of a scanning and copying system according to the invention.

Фиг.2. Возможный внешний вид системы сканирования и копирования согласно изобретению.Figure 2. A possible appearance of the scanning and copying system according to the invention.

Фиг.3. Блок-схема основных этапов способа сканирования и копирования согласно изобретению.Figure 3. A block diagram of the main steps of a scanning and copying method according to the invention.

Фиг.4. Схема переплета объекта в системе координат камеры согласно изобретению.Figure 4. The binding scheme of the object in the coordinate system of the camera according to the invention.

Фиг.5. Блок-схема этапов анализа кадра объекта согласно изобретению.Figure 5. A block diagram of the steps of analyzing an object frame according to the invention.

Фиг.6. Изображение фрагмента страниц книги вблизи переплета в системе координат сканера.6. Image of a fragment of book pages near the binding in the scanner coordinate system.

Фиг.7. График яркости фона для страницы книги вблизи переплета согласно изобретению.7. Graph of background brightness for a book page near the binding according to the invention.

Фиг.8. Блок-схема коррекции отсканированного изображения, а именно коррекции дисторсии и тени для каждой сканированной строки в области изгиба страницы согласно изобретению.Fig. 8. The block diagram of the correction of the scanned image, namely the correction of distortion and shadow for each scanned line in the bending area of the page according to the invention.

Фиг.9. Пример коррекции объекта согласно изобретению:Fig.9. An example of the correction of an object according to the invention:

a) сканированный фрагмент страницы книги без коррекции;a) a scanned fragment of a page of a book without correction;

b) сканированный фрагмент страницы книги с коррекцией только дисторсии;b) a scanned fragment of a book page with correction of distortion only;

c) сканированный фрагмент страницы книги с коррекцией дисторсии и тени.c) a scanned fragment of a book page with correction for distortion and shadow.

На Фиг.1 показана блок-схема системы сканирования и копирования согласно изобретению. Система сканирования и копирования содержит сканер 1, камеру 2, процессор 3, содержащий модуль 4 коррекции изображений, блок 5 памяти данных параметров документов, блок 6 памяти программ, содержащий средство 7 коррекции, внешнее устройство 8 и шину 9 данных. Работа системы управляется процессором 3. Камера 2 расположена на одной из боковых сторон сканера 1, причем объектив камеры 2 расположен с боковой стороны объекта, непосредственно напротив торца переплета. При этом камера 2 выполнена с возможностью получения снимка объекта в области изгиба страниц вблизи переплета. Средство 7 коррекции выполнено с возможностью установления параметров и способа коррекции изображения. Модуль 4 коррекции искажений выполнен с возможностью анализа снимка объекта и коррекции искажений отсканированного изображения объекта. Обмен данными между сканером 1, камерой 2, процессором 3, блоком 5 памяти данных, блоком 6 памяти программ и внешним устройством 8 осуществляется по шине 9 данных. При сканировании обработка может осуществляться для отдельной строки изображения или для нескольких строк.Figure 1 shows a block diagram of a scanning and copying system according to the invention. The scanning and copying system comprises a scanner 1, a camera 2, a processor 3, comprising an image correction module 4, a document parameter data memory unit 5, a program memory unit 6 containing the correction means 7, an external device 8 and a data bus 9. The operation of the system is controlled by the processor 3. Camera 2 is located on one of the sides of the scanner 1, and the lens of camera 2 is located on the side of the object, directly opposite the end of the binding. In this case, the camera 2 is configured to obtain a snapshot of the object in the bending area of the pages near the binding. The correction means 7 is configured to set parameters and an image correction method. The distortion correction module 4 is configured to analyze the image of the object and correct distortions of the scanned image of the object. Data exchange between the scanner 1, camera 2, processor 3, data memory unit 5, program memory unit 6 and external device 8 is carried out via data bus 9. When scanning, processing can be performed for a single image line or for several lines.

Фиг.2 иллюстрирует возможный вариант внешнего вида системы сканирования и копирования и показывает взаимное расположение подложки 10, камеры 2 и объекта 11. Объект 11 сканирования располагают на подложке 10 планшетного сканера 1 в развернутом виде страницами вниз, а страницы объекта 11 прижаты к подложке 10. Причем объект 11 располагают на подложке 10 торцом переплета напротив метки 12 на корпусе сканера 1, а страницы объекта 11 расположены параллельно границам подложки 10. Для облегчения позиционирования на границах подложки и на корпусе сканер наносят метки 12 или используют ограничители. На одной из боковых сторон сканера 1, за меткой 12 расположена камера 2. В данном варианте системы камера 2 является черно-белой или цветной цифровой камерой низкого разрешения. Поле зрения камеры 2 таково, чтобы вся область изгиба страниц вблизи переплета объекта 11 попадала на снимок камеры 2. Размер снимка камеры по горизонтали 10-12 см достаточен для книг и аналогичных переплетенных объектов до формата A3. Угол наклона камеры 2 к плоскости подложки 10 сканера 1 устанавливается в диапазоне от 0 до 60 градусов и зависит от оптической системы камеры 2 и дизайна внешнего вида системы в целом. Камера 2 расположена на одной из боковых сторон сканера 1, причем объектив камеры 2 расположен с боковой стороны объекта, вдоль линии переплета. Камера 2 может быть встроена в корпус сканера 1 или подсоединяться на момент сканирования.Figure 2 illustrates a possible variant of the appearance of the scanning and copying system and shows the relative position of the substrate 10, camera 2 and object 11. The scanning object 11 is placed on the substrate 10 of the flatbed scanner 1 in the expanded form with the pages facing down, and the pages of the object 11 are pressed against the substrate 10. Moreover, the object 11 is placed on the substrate 10 with the end face of the binding opposite the mark 12 on the scanner body 1, and the pages of the object 11 are parallel to the borders of the substrate 10. To facilitate positioning on the borders of the substrate and on the body, the scanner is nano Mark 12 or use delimiters. On one of the sides of the scanner 1, behind the mark 12, there is a camera 2. In this version of the system, the camera 2 is a black and white or low-resolution color digital camera. The field of view of the camera 2 is such that the entire bending area of the pages near the binding of the object 11 falls on the image of the camera 2. The horizontal image size of the camera 10-12 cm is sufficient for books and similar bound objects up to A3 format. The angle of inclination of the camera 2 to the plane of the substrate 10 of the scanner 1 is set in the range from 0 to 60 degrees and depends on the optical system of the camera 2 and the design of the appearance of the system as a whole. The camera 2 is located on one of the sides of the scanner 1, and the lens of the camera 2 is located on the side of the object, along the binding line. Camera 2 can be integrated into the scanner 1 housing or connected at the time of scanning.

Важно отметить, что использование камеры 2 является одним из самых простых способов для усредненной оценки изгиба страниц объекта 11 вблизи переплета. Далее будет показано, что данное техническое решение позволяет производить коррекцию геометрических и яркостных искажений, возникающих при сканировании переплетенных объектов.It is important to note that the use of camera 2 is one of the simplest methods for the average estimate of the bending of the pages of the object 11 near the binding. It will be shown below that this technical solution allows the correction of geometric and luminance distortions that occur when scanning intertwined objects.

На той же стороне системы, что и камера 2, расположен осветитель 13, который включается во время съемки объекта 11 камерой 2 и обеспечивает такое освещение, чтобы боковая (т.е. торцевая) часть объекта 11 освещалась, а остальная часть оставалась темной. Возможно, однако, и другое решение проблемы освещения, обеспечивающего выраженный контраст между торцевой частью объекта и остальными его частями. Сканирующая головка 14 сканера 1 движется вдоль оси Ys параллельно подложке 10 сканера 1. Сверху объект 11 на подложке 10 накрывают крышкой 15 либо иным способом обеспечивают прижатие объекта 11 к подложке 10 сканера 1. Скорректированное отсканированное изображение объекта 11 выводят на внешнее устройство 8, которым в данном варианте системы является принтер, встроенный в корпус сканера 1. На Фиг.1 показан выходной лоток 14 печатающего устройства.A illuminator 13 is located on the same side of the system as the camera 2, which is turned on during the shooting of the object 11 by the camera 2 and provides such lighting that the lateral (i.e., end) part of the object 11 is illuminated and the rest remains dark. It is possible, however, and another solution to the problem of lighting, providing a pronounced contrast between the end part of the object and the rest of its parts. The scanning head 14 of the scanner 1 moves along the Y s axis parallel to the substrate 10 of the scanner 1. From above, the object 11 on the substrate 10 is covered with a lid 15 or otherwise presses the object 11 against the substrate 10 of the scanner 1. The corrected scanned image of the object 11 is output to an external device 8, which in this embodiment of the system, a printer is integrated in the scanner body 1. FIG. 1 shows an output tray 14 of a printing apparatus.

На Фиг.1 также обозначены системы координат, используемые в описании ниже:Figure 1 also indicates the coordinate system used in the description below:

XsYsZs - система координат сканированного изображения объекта;X s Y s Z s - coordinate system of the scanned image of the object;

XcZc - система координат кадра объекта, снятого камерой;X c Z c - coordinate system of the frame of the object captured by the camera;

XpYp - система координат напечатанного скорректированного изображения объекта.X p Y p is the coordinate system of the printed corrected image of the object.

На Фиг.3 приведена блок-схема основных этапов способа сканирования и копирования объектов в переплете согласно изобретению. Пользователь ориентирует объект 11 на подложке 10 сканера 1, закрывает крышку 15 сканера 1 и дает команду на сканирование объекта 11. После чего включают боковой осветитель 13, снимают камерой 2 объект 11, при этом получают снимок объекта 11 (шаг 1). Записывают полученный снимок объекта в блок 5 памяти 0 данных. Анализируют в модуле 4 коррекции искажений процессора 3 наличие искажений в снимке объекта 11 из блока 5 памяти данных в соответствии с параметрами, полученными из средства 7 коррекции. При этом определяют имеет ли объект 11 искажения вблизи переплета (шаг 2). В случае, если объект имеет искажения вблизи переплета, определяют и сохраняют в блоке 5 памяти данных параметры, характеризующие форму изгиба страниц объекта 11 вблизи переплета (шаг 3). После чего сканируют объект 11 сканером 1 (шаг 4). Записывают отсканированное изображение объекта 11 в блок 5 памяти данных. Определяют и корректируют в модуле 4 искажения отсканированного изображения объекта из блока 5 памяти данных в соответствии с параметрами и способом коррекции, установленными в средстве 7 коррекции (шаг 5). При этом используют данные, характеризующие форму изгиба страниц объекта 11 вблизи переплета. В итоге записывают скорректированное отсканированное изображение объекта 11 в блок 5 памяти данных и выводят его на внешнее устройство 8 (шаг 6), например принтер, при этом получают скорректированную копию объекта. В случае, если объект 11 не имеет искажений вблизи переплета, сканируют объект 11 сканером 1 (шаг 4) и выводят отсканированное изображение объекта 11 на внешнее устройство 8 (шаг 6).Figure 3 shows a block diagram of the main steps of the method of scanning and copying objects in binding according to the invention. The user orientates the object 11 on the substrate 10 of the scanner 1, closes the lid 15 of the scanner 1 and gives the command to scan the object 11. Then turn on the side illuminator 13, shoot the object 11 with the camera 2, and a picture of the object 11 is obtained (step 1). Record the received snapshot of the object in block 5 of memory 0 data. Analyze in the distortion correction module 4 of the processor 3 the presence of distortions in the image of the object 11 from the data memory unit 5 in accordance with the parameters obtained from the correction means 7. In this case, it is determined whether the object 11 has distortions near the binding (step 2). If the object has distortions near the binding, the parameters characterizing the bending shape of the pages of the object 11 near the binding are determined and stored in the data storage unit 5 (step 3). Then scan the object 11 with the scanner 1 (step 4). The scanned image of the object 11 is recorded in the data memory unit 5. The distortions of the scanned image of the object from the data memory unit 5 are determined and corrected in the module 4 in accordance with the parameters and the correction method set in the correction means 7 (step 5). This uses data characterizing the shape of the bending pages of the object 11 near the binding. As a result, the corrected scanned image of the object 11 is recorded in the data memory unit 5 and output to an external device 8 (step 6), for example, a printer, and an adjusted copy of the object is obtained. If the object 11 does not have distortions near the binding, scan the object 11 with the scanner 1 (step 4) and output the scanned image of the object 11 to the external device 8 (step 6).

На Фиг.5 приведена блок-схема этапов анализа кадра объекта согласно изобретению. В блок-схеме используются обозначения, принятые ранее на Фиг.4. На первом этапе вводят систему координат кадра объекта, снятого камерой XcZc, ось Хс которой направлена параллельно, а ось Zc - перпендикулярно подложке, в системе координат кадра объекта, снятого камерой, задают массив точек на подложке сканера, отстоящих друг от друга на равном расстоянии, и определяют координаты {xc(i)} каждой точки массива на подложке сканера. Для всех точек массива с координатами (xc(i)} определяют массив расстояний {h(i)} от каждой точки на подложке сканера zc=0 до ее проекции на странице объекта. В результате получают массив пар точек {xc(i), h(i)}. Определяют координату xс0, соответствующую максимуму массива расстояний (абсциссу максимума):5 is a flowchart of steps for analyzing an object frame according to the invention. In the block diagram, the notation adopted earlier in FIG. 4 is used. At the first stage, the coordinate system of the frame of the object captured by the camera X c Z c is introduced, the X axis with which is directed parallel to and the Z c axis is perpendicular to the substrate, in the coordinate system of the frame of the object captured by the camera, an array of points on the scanner substrate are set apart each other at an equal distance, and determine the coordinates {x c (i)} of each point in the array on the scanner substrate. For all points of the array with coordinates (x c (i)}, an array of distances {h (i)} from each point on the scanner substrate z c = 0 to its projection on the object page is determined. As a result, an array of pairs of points {x c (i ), h (i)}. The coordinate x с0 corresponding to the maximum of the array of distances (the abscissa of the maximum) is determined:

Figure 00000007
Figure 00000007

Анализируют характер массива {xc(i), h(i)} слева и справа от xс0 и делают заключение о том, имеет объект искажения вблизи переплета или нет. Если объект не имеет искажений вблизи переплета, то коррекцию отсканированного изображения объекта не производят. В случае, если объект имеет искажения вблизи переплета, массив {xc(i), h(i)} преобразуют в два массива координат (xc(j), zca(j)} и {xc(j), zcb(j)}, как показано на Фиг.4. Вводят систему координат сканера XsZs, оси которой совпадают с осями системы координат кадра объекта, снятого камерой XcZc. Массивы координат {xc(j), zca(j)} и {xc(j), zcb(j)} преобразуют (конвертируют) в систему координат сканера XsZs:They analyze the nature of the array {x c (i), h (i)} to the left and to the right of x с0 and make a conclusion about whether the object has distortions near the binding or not. If the object does not have distortions near the binding, then the scanned image of the object is not corrected. If the object has distortions near the binding, the array {x c (i), h (i)} is converted into two coordinate arrays (x c (j), z ca (j)} and {x c (j), z cb (j)}, as shown in Figure 4. Enter the coordinate system of the scanner X s Z s , the axes of which coincide with the axes of the coordinate system of the frame of the object captured by the camera X c Z c . Arrays of coordinates {x c (j), z ca (j)} and {x c (j), z cb (j)} convert (convert) to the scanner coordinate system X s Z s :

Figure 00000008
Figure 00000008

где

Figure 00000009
согласует разрешение камеры и сканера по оси X; d согласует разрешение камеры и сканера по оси Z, а также учитывают угол наклона камеры к подложке; tx переносит начало системы координат. В результате получают массивы координат
Figure 00000010
Figure 00000011
из n элементов и {xsb(j), zsb(j)} из m элементов, определяющие форму изгиба страницы объекта. Эти массивы используются для коррекции дисторсии и тени.Where
Figure 00000009
Coordinates the resolution of the camera and scanner along the X axis; d matches the resolution of the camera and scanner along the Z axis, and also takes into account the angle of inclination of the camera to the substrate; tx transfers the origin of the coordinate system. The result is an array of coordinates
Figure 00000010
Figure 00000011
of n elements and {x sb (j), z sb (j)} of m elements that determine the shape of the page bend of the object. These arrays are used to correct distortion and shadow.

Рассмотрим схематичное изображение страницы объекта без коррекции в системе координат сканера (Фиг.6). Значения пикселов каждой строки сканированного изображения в диапазоне

Figure 00000012
Figure 00000013
имеют геометрические (дисторсия) и яркостные/цветовые (тень) искажения. В то же время пикселы вне этого диапазона не искажены и переносятся в результирующее изображение без преобразований.Consider a schematic image of the page of the object without correction in the coordinate system of the scanner (Fig.6). The pixel values of each line of the scanned image in the range
Figure 00000012
Figure 00000013
have geometric (distortion) and brightness / color (shadow) distortions. At the same time, pixels outside this range are not distorted and are transferred to the resulting image without transformations.

Причиной дисторсии является то, что изображение изогнутой поверхности страницы объекта проецируют на плоскость подложки сканера. При данной ориентации объекта и головки сканирования дисторсия имеет место только вдоль оси Xs, следовательно, каждая строка сканированного изображения может быть скорректирована независимо от других строк. Для восстановления функций изгиба страниц объекта при коррекции отсканированного изображения используют кусочно-линейную интерполяцию по массивам координат

Figure 00000014
и
Figure 00000015
. Количество пикселов каждой строки скорректированного отсканированного изображения объекта превосходит количество пикселов отсканированного изображения на Delta:The reason for the distortion is that the image of the curved surface of the object page is projected onto the plane of the scanner substrate. With this orientation of the object and the scanning head, distortion occurs only along the X s axis; therefore, each line of the scanned image can be adjusted independently of other lines. To restore the function of bending the pages of an object during correction of a scanned image, piecewise linear interpolation using coordinate arrays is used
Figure 00000014
and
Figure 00000015
. The number of pixels of each line of the adjusted scanned image of the object exceeds the number of pixels of the scanned image in Delta:

Figure 00000016
Figure 00000016

где round - функция округления до ближайшего целого,

Figure 00000017
и
Figure 00000018
- суммарные длины интерполирующих отрезков, что соответствует количеству пикселов изогнутых частей страниц:where round is the function of rounding to the nearest integer,
Figure 00000017
and
Figure 00000018
- the total lengths of the interpolating segments, which corresponds to the number of pixels of the curved parts of the pages:

Figure 00000019
,
Figure 00000019
,

Для коррекции дисторсии вдоль интерполированной кривой, образованной сечением изогнутой поверхности страницы объекта, отсчеты выбирают с шагом в единицу длины системы координат сканера, в результате чего определяют соответствующую координату xs', по которой из сканированного изображения вычисляют значения цветовых составляющих R'G'B' скорректированного изображения путем линейной интерполяции по значениям цветовых составляющих пикселов RGB сканированного изображения с координатами floor(xs') и floor(xs')+1, где floor - функция взятия целой части:To correct distortion along the interpolated curve formed by the cross section of the curved surface of the page of the object, the samples are selected in increments of a unit length of the scanner coordinate system, as a result of which the corresponding coordinate x s 'is determined, from which the values of the color components R'G'B' are calculated from the scanned image corrected image by linear interpolation according to the values of the color components of the RGB pixels of the scanned image with the coordinates floor (x s ') and floor (x s ') +1, where floor is the function of taking the integer part:

Figure 00000020
Figure 00000020

для G' и В' аналогично.for G 'and B' is similar.

Текущие координаты отсчетов (xs', zs') вдоль интерполированной отрезками кривой вычисляют по параметрическим уравнениям отрезков прямой от точки с координатами

Figure 00000021
до
Figure 00000022
i=2...n:The current coordinates of the samples (x s ', z s ') along the curve interpolated by the segments are calculated by the parametric equations of the segments of the straight line from the point with the coordinates
Figure 00000021
before
Figure 00000022
i = 2 ... n:

Figure 00000023
Figure 00000023

где t=0 в начале отрезка (точка

Figure 00000024
, t=1 в конце отрезка (точка
Figure 00000025
шаг изменения t:where t = 0 at the beginning of the segment (point
Figure 00000024
, t = 1 at the end of the segment (point
Figure 00000025
change step t:

Figure 00000026
Figure 00000026

Вычисления текущих координат отсчетов (xs', zs') вдоль интерполированной кривой для массива {xsb(j), zsb(j)} производят аналогично.The calculation of the current coordinates of the samples (x s ', z s ') along the interpolated curve for the array {x sb (j), z sb (j)} is carried out similarly.

В общем случае характер яркостных и цветовых искажений в области изгиба страницы имеет сложный характер, определяемый многими факторами. Типичным эффектом является затемнение изображения (образования тени) вблизи переплета книги. График яркости фона страницы объекта для этой области (вдоль отрезка АО с Фиг.6) показан на Фиг.7. Экспериментально удалось установить, что существует усредненная зависимость яркости искаженного пиксела от яркости исходного пиксела и расстояния до проекции этого пиксела на странице от подложки сканера. Далее эту зависимость преобразуют в функцию, учитывающую также и разрешение сканирования:In the general case, the nature of the brightness and color distortions in the bending area of the page has a complex character, determined by many factors. A typical effect is the darkening of the image (shadowing) near the binding of the book. The graph of the brightness of the background page of the object for this area (along the segment AO of Fig.6) is shown in Fig.7. It was experimentally found that there is an average dependence of the brightness of the distorted pixel on the brightness of the original pixel and the distance to the projection of this pixel on the page from the scanner substrate. Next, this dependence is converted into a function that also takes into account the resolution of the scan:

Figure 00000027
Figure 00000027

где Y'(x, у) - яркость скорректированного пиксела, Y(xs', у) - яркость пиксела сканированного изображения, zs' - расстояния до страницы от подложки сканера в xs'.where Y '(x, y) is the brightness of the corrected pixel, Y (x s ', y) is the brightness of the pixel of the scanned image, z s 'is the distance to the page from the scanner substrate in x s '.

Одним из простейших вариантов f(Y(xs', у), zs') может служить следующая функция:One of the simplest versions of f (Y (x s ', y), z s ') can be the following function:

Figure 00000028
Figure 00000028

где значения яркости нормированы в диапазон от 0 до 1, функция измерена для разрешения 200 dpi и определенной модели сканера. Данная функция использована для коррекции изображения с Фиг.9а, результат коррекции показан на Фиг.9с. Для каждой конкретной модели сканера эта зависимость может быть измерена предварительно.where the brightness values are normalized in the range from 0 to 1, the function is measured for a resolution of 200 dpi and a specific scanner model. This function was used to correct the image from Fig. 9a; the correction result is shown in Fig. 9c. For each specific scanner model, this dependence can be measured previously.

Для получения значения яркости Y R'G'B' - составляющие отсканированного изображения после коррекции дисторсии преобразуют в цветовую систему, один из каналов которой является яркостью, а два других кодируют цвет. Эффективно использовать линейное преобразование в систему YIQ или YCbCr, но в рамках данного изобретения могут использоваться и более сложные преобразования, например, в цветовые системы HSB или L*a*b*. После коррекции значения яркости Y->Y' происходит обратное преобразование в цветовую систему RGB, два остальных канала, кодирующих цвет, не изменяются.To obtain the brightness value Y R'G'B '- the components of the scanned image after distortion correction are converted into a color system, one of the channels of which is brightness, and the other two encode color. It is effective to use linear conversion to a YIQ or YCbCr system, but more complex transformations, for example, to HSB or L * a * b * color systems, can be used within the framework of the present invention. After the correction of the brightness value Y-> Y ', the inverse is converted to the RGB color system, the other two channels encoding the color are not changed.

На Фиг.8 приведена блок-схема коррекции дисторсии и тени для каждой сканированной строки с координатой у в диапазоне изгиба страницы

Figure 00000029
. На шаге 1' инициализируется счетчик цикла i для перебора интерполирующих отрезков прямой, построенных по массивам координат
Figure 00000030
и устанавливается начальное значение для переменной npix - счетчика количества скорректированных пикселов. На шаге 2' в соответствии с формулой (7) определяется величина dt, равная единице длины системы координат сканера, и переменная nsteps, равная количеству отсчетов, дискретизирующих текущий отрезок. На шаге 3' инициализируется счетчик цикла k для перебора отсчетов на отрезке, и для параметра прямой t устанавливается нулевое значение, которое соответствует началу отрезка. На шаге 4' отсчеты выбираются в соответствии с параметрическим уравнением прямой (6) и определяются значения (xs', zs'). На шаге 5' вычисляется значение индекса в массиве скорректированных пикселов. На шаге 6' из сканированного изображения вычисляются значения цветовых составляющих R'G'B' скорректированного изображения путем линейной интерполяции (5) по значениям цветовых составляющих пикселов RGB сканированного изображения с координатами floor(xs') и floor(xs')+1. На шаге 7' выполняется конвертирование значений цветовых координат текущего пиксела R'G'B' в цветовое пространство YCbCr. На шаге 8' осуществляется коррекция яркостных (теневых) искажений. Обратное преобразование из цветового пространства YCbCr, где значение яркости Y уже скорректировано на предыдущем шаге, выполняется на шаге 9'. На шаге 10' увеличиваются на единицу количество скорректированных пикселов и число взятых на отрезке отсчетов. При этом на величину dt увеличивается параметр прямой t. Шаги с 4' по 10' выполняются в цикле пока условие 11' истинно.On Fig shows a block diagram of the correction of distortion and shadow for each scanned line with coordinate y in the range of page bending
Figure 00000029
. At step 1 ', the loop counter i is initialized to iterate over the interpolating line segments constructed from the coordinate arrays
Figure 00000030
and sets the initial value for the variable npix - the counter of the number of adjusted pixels. In step 2 ', in accordance with formula (7), the quantity dt is determined equal to the unit length of the scanner coordinate system and the variable nsteps is equal to the number of samples discretizing the current segment. At step 3 ', the loop counter k is initialized to iterate over the samples on the segment, and for the parameter of the line t, a zero value is set that corresponds to the beginning of the segment. At step 4 ', the samples are selected in accordance with the parametric equation of the straight line (6) and the values (x s ', z s ') are determined. At step 5 ', the index value in the corrected pixel array is calculated. In step 6 ', the values of the color components R'G'B' of the corrected image are calculated from the scanned image by linear interpolation (5) from the values of the color components of the RGB pixels of the scanned image with the coordinates floor (x s ') and floor (x s ') +1 . In step 7 ', the color coordinates of the current pixel R'G'B' are converted into the YCbCr color space. At step 8 ', the correction of luminance (shadow) distortions is carried out. The inverse transformation from the YCbCr color space, where the brightness value Y has already been adjusted in the previous step, is performed in step 9 '. At step 10 ', the number of corrected pixels and the number of samples taken in the interval of samples are increased by one. In this case, the parameter t of the line increases by dt. Steps 4 'to 10' are executed in a loop until condition 11 'is true.

На шаге 12' уменьшается на единицу счетчик цикла i для перебора интерполирующих отрезков прямой.At step 12 ', the counter of cycle i is reduced by one to iterate over the interpolating line segments.

Шаги с 2' по 12' выполняются в цикле для каждого отрезка пока условие 13' истинно.Steps 2 'to 12' are performed in a cycle for each segment while condition 13 'is true.

Для коррекции в диапазоне [xsb(1), xsb(m)] блок-схема в целом аналогична.For correction in the range [x sb (1), x sb (m)], the block diagram is generally similar.

Тот факт, что для каждой строки сканированного коррекция производится независимо позволяет значительно оптимизировать время выполнения коррекции за счет предварительного вычисления таблицы перекодировки (LUT - LookUp Table) со значениями (xs', zs'), индексом в LUT является координата х скорректированного изображения.The fact that for each line of the scanned correction is carried out independently allows you to significantly optimize the correction time by pre-computing the look-up table (LUT - LookUp Table) with values (x s ', z s '), the index in the LUT is the x coordinate of the corrected image.

После выполнения коррекции изображение выводят на печатающее устройство, при этом получают копию объекта. Перед выводом на печать координаты пикселов (х, у) скорректированного изображения преобразуют в координаты печатного устройства:After performing the correction, the image is displayed on a printing device, and a copy of the object is obtained. Before printing, the coordinates of the pixels (x, y) of the corrected image are converted into the coordinates of the printing device:

Figure 00000031
Figure 00000031

где ρ согласует разрешение сканера и принтера; tx1 и ty1 переносят начало системы координат.where ρ matches the resolution of the scanner and printer; tx1 and ty1 carry the origin of the coordinate system.

Данное изобретение предполагает осуществлять кадрирование по границам объекта или страниц.The present invention contemplates framing along the borders of an object or pages.

Также возможна различная логика работы системы при копировании, например, когда копируется только одна страница книги или две страницы книги копируются на 1 лист с масштабированием и тому подобное.Various logic of the system’s operation during copying is also possible, for example, when only one page of a book is copied or two pages of a book are copied onto 1 sheet with scaling and the like.

В рамках данного изобретения возможно движение сканирующей головки планшетного сканера вдоль оси Xs, что потребует коррекции нескольких строк и незначительного изменения в средстве установления коррекции (в частности показанного на Фиг.8), но не влияет на основные принципы заявленной системы и способа сканирования.Within the framework of the present invention, it is possible to move the scanning head of the flatbed scanner along the X s axis, which will require correction of several lines and a slight change in the correction tool (in particular, shown in Fig. 8), but will not affect the basic principles of the claimed system and scanning method.

На Фиг.9 приведен пример коррекции фрагмента страницы книги. Фиг.9а демонстрирует сканированный фрагмент страницы книги без коррекции, Фиг.9b - коррекцию только дисторсии, Фиг.9с - коррекцию дисторсии и тени.Figure 9 shows an example of correction of a fragment of a page of a book. Fig. 9a shows a scanned fragment of a book page without correction, Fig. 9b - correction of distortion only, Fig. 9c - correction of distortion and shadow.

Необходимо отметить, что настоящее изобретение может использоваться не только для книг, но и для любых других объектов (например, документов и фотографий) как обычный копир или планшетный сканер. Соответственно лучшим вариантом реализации изобретения является модификация копира, планшетного сканера или многофункционального периферийного устройства (MFP).It should be noted that the present invention can be used not only for books, but also for any other objects (for example, documents and photographs) as a regular copier or flatbed scanner. Accordingly, the best embodiment of the invention is the modification of a copier, flatbed scanner or multifunction peripheral device (MFP).

Наиболее существенными улучшениями, которые обеспечиваются на основе заявленного изобретения, являются:The most significant improvements that are provided on the basis of the claimed invention are:

а) корректировка геометрических искажений и выравнивание относительной освещенности в процессе сканирования объектов в толстом переплете, в частности книг, обеспечивается практически в реальном масштабе времени за счет использования процедуры обработки снимка, формируемого камерой, расположенной сбоку от сканируемого объекта;a) the correction of geometric distortions and the alignment of relative illumination during scanning of thick-bound objects, in particular books, is ensured in almost real time by using the image processing procedure generated by the camera located to the side of the scanned object;

b) анализ формы изгиба страниц объекта в предварительном режиме, а именно уже в момент начала процесса сканирования, дает возможность обеспечить приемлемые требования к аппаратным ресурсам системы (запоминание в предпочтительном варианте изобретения, лишь одной или нескольких линий сканирования);b) analysis of the shape of the bending of the object’s pages in preliminary mode, namely at the time of the start of the scanning process, makes it possible to provide acceptable requirements for the system’s hardware resources (storing in the preferred embodiment of the invention only one or more scanning lines);

с) возможность использования предложенного способа для коррекции подобного рода помех в иных устройствах подобного рода, например сканерах, осуществляющих сканирование сверху, или в случаях, когда снимок объекта формируется с помощью основной цифровой камеры высокого разрешения.c) the possibility of using the proposed method for correcting this kind of interference in other devices of this kind, for example, scanners that scan from above, or in cases where an image of the object is formed using the main digital camera of high resolution.

Указанный выше вариант выполнения изобретения изложен с целью иллюстрации заявленного изобретения, при этом специалистам ясно, что возможны разные модификации, добавления и замены, не выходящие из объема и смысла настоящего изобретения, раскрытого в формуле изобретения.The above embodiment of the invention is set forth to illustrate the claimed invention, while it is clear to those skilled in the art that various modifications, additions and substitutions are possible without departing from the scope and meaning of the present invention disclosed in the claims.

Claims (17)

1. Система сканирования документов, преимущественно переплетенных, содержащая связанные между собой шиной данных сканер, цифровую камеру, процессор, блок памяти программ, блок памяти данных параметров документов и внешнее отображающее устройство, причем сканер имеет подложку, на которой размещается и вдоль которой сканируется документ, а цифровая камера расположена на одной из боковых сторон сканера напротив линии изгиба документа в переплете, и объектив цифровой камеры направлен на торцевую сторону документа, при этом цифровая камера выполнена с возможностью получения снимка документа в области изгиба страниц вблизи переплета, блок памяти программ содержит средство коррекции, выполненное с возможностью установления параметров и способа коррекции изображения, процессор имеет модуль коррекции искажений, выполненный с возможностью анализа снимка документа, полученного с цифровой камеры, а также коррекции искажений отсканированного документа вблизи переплета путем определения и обработки параметров, характеризующих форму изгиба страниц документа вблизи переплета в соответствии с параметрами и способом коррекции.1. A system for scanning documents, predominantly bound, comprising a scanner, a digital camera, a processor, a program memory unit, a document parameter data memory unit and an external display device, the scanner having a substrate on which the document is located and along which and the digital camera is located on one of the sides of the scanner opposite the binding line of the document in binding, and the lens of the digital camera is directed to the front side of the document, while the digital camera made with the possibility of obtaining a snapshot of the document in the area of bending pages near the binding, the program memory unit contains correction means configured to set parameters and an image correction method, the processor has a distortion correction module configured to analyze a snapshot of a document received from a digital camera, and correction of distortions of the scanned document near the binding by determining and processing parameters characterizing the form of bending of the pages of the document near the binding in accordance with the parameters and correction method. 2. Система по п.1, отличающаяся тем, что сканер выполнен планшетным.2. The system according to claim 1, characterized in that the scanner is made flatbed. 3. Система по п.1, отличающаяся тем, что подложка сканера выполнена из стекла или другого прозрачного материала.3. The system according to claim 1, characterized in that the scanner substrate is made of glass or other transparent material. 4. Система по п.1, отличающаяся тем, что сканируемый документ размещается на подложке в развернутом виде, причем страницы документа прижаты к подложке.4. The system according to claim 1, characterized in that the scanned document is placed on the substrate in expanded form, and the pages of the document are pressed against the substrate. 5. Система по п.1, отличающаяся тем, что сканируемый документ размещается на подложке сканера таким образом, что края страниц документа расположены параллельно границам подложки сканера.5. The system according to claim 1, characterized in that the scanned document is placed on the scanner substrate in such a way that the edges of the pages of the document are parallel to the borders of the scanner substrate. 6. Система по п.1, отличающаяся тем, что рядом с цифровой камерой расположено, по меньшей мере, одно осветительное устройство, выполненное с возможностью включения во время съемки документа цифровой камерой и освещения документа со стороны цифровой камеры.6. The system according to claim 1, characterized in that at least one lighting device is arranged next to the digital camera, configured to turn on the digital camera while the document is being shot and the document is illuminated. 7. Система по п.1, отличающаяся тем, что цифровая камера встроена в корпус сканера.7. The system according to claim 1, characterized in that the digital camera is built into the scanner body. 8. Система по п.1, отличающаяся тем, что цифровая камера подсоединятся к сканеру на момент сканирования документа.8. The system according to claim 1, characterized in that the digital camera is connected to the scanner at the time of scanning the document. 9. Система по п.1, отличающаяся тем, что цифровая камера расположена под углом от 0 до 60° к подложке сканера.9. The system according to claim 1, characterized in that the digital camera is located at an angle from 0 to 60 ° to the scanner substrate. 10. Система по п.1, отличающаяся тем, что в качестве внешнего отображающего устройства система содержит, по меньшей мере, одно устройство, выбранное из группы, включающей монитор, принтер, или компьютер.10. The system according to claim 1, characterized in that, as an external display device, the system comprises at least one device selected from the group including a monitor, printer, or computer. 11. Способ сканирования документов, включающий в себя следующие операции: снимают цифровой камерой документ; записывают полученный снимок документа в блок памяти данных параметров документов; анализируют в модуле коррекции искажений процессора наличие искажений в снимке документа, сохраненном в блоке памяти данных параметров документов, в соответствии с параметрами, полученными из средства коррекции блока памяти данных параметров документов, при этом определяют, имеет ли документ искажения вблизи переплета, в случае, если документ не имеет искажений вблизи переплета, сканируют документ сканером и выводят изображение документа на внешнее отображающее устройство, в случае, если документ имеет искажения вблизи переплета, определяют и сохраняют в блоке памяти данных параметров документов параметры, характеризующие форму изгиба страниц документа вблизи переплета; сканируют документ сканером; записывают отсканированное изображение документа в блок памяти данных параметров документов; корректируют в модуле коррекции искажений процессора искажения отсканированного изображения документа из блока памяти данных параметров документов, в соответствии с параметрами и способом коррекции, установленными в средстве коррекции блока памяти данных параметров документов, при этом используют параметры, характеризующие форму изгиба страниц документа вблизи переплета; записывают скорректированное отсканированное изображение документа в блок памяти данных параметров документов и выводят его на внешнее отображающее устройство.11. A method of scanning documents, including the following operations: remove a document with a digital camera; write the received snapshot of the document in the memory unit data parameters of the documents; analyze in the processor distortion correction module the presence of distortions in the document image stored in the document parameter data memory in accordance with the parameters obtained from the correction means of the document parameter data memory block, and it is determined whether the document has distortions near the binding, if the document has no distortions near the binding, the document is scanned by the scanner and the image of the document is displayed on an external display device, in case the document has distortions near the binding, fissionable and stored in the data memory unit parameters documents parameters characterizing the shape bend near the binding of document pages; scan a document with a scanner; write the scanned image of the document in the memory unit data parameters of the documents; correct in the distortion correction module of the processor of the distortion of the scanned image of the document from the data unit of the document parameter data in accordance with the parameters and the correction method set in the correction tool of the memory unit of the document parameter data, using parameters characterizing the shape of the bending of the document pages near the binding; write the corrected scanned image of the document in the memory unit of the data parameters of the documents and output it to an external display device. 12. Способ по п.11, отличающийся тем, что снимают цифровой камерой документ, при этом освещают документ, по меньшей мере, одним осветительным устройством со стороны цифровой камеры.12. The method according to claim 11, characterized in that they remove the document with a digital camera, while illuminating the document with at least one lighting device from the side of the digital camera. 13. Способ по п.11, отличающийся тем, что анализируют в модуле коррекции искажений процессора снимок объекта из блока памяти данных параметров документов, при этом вводят систему координат кадра объекта снятого камерой XcZc, ось Хс которой направлена параллельно, а ось Zc перпендикулярно подложке, в системе координат кадра объекта, снятого камерой, задают массив точек на подложке сканера, отстоящих одна от другой на равное расстояние, и определяют координаты {xc(i)} каждой точки массива на подложке сканера, для всех точек массива с координатами {xc(i)} определяют массив расстояний {h(i)} от каждой точки на подложке сканера zc=0 до ее проекции на странице объекта, в результате получают массив пар точек {xc(i), h(i)}, определяют координату xс0, соответствующую максимуму массива расстояний:13. The method of claim 11, wherein the analyzing module in the distortion correction processing of a picture object document data memory unit parameters, the injected frame coordinate system of the object captured by the camera X c Z c, X-axis which is parallel to and the axis Z c perpendicular to the substrate, in the frame coordinate system of the object captured by the camera, specify an array of points on the scanner substrate that are equally spaced from one another, and determine the coordinates {x c (i)} of each array point on the scanner substrate for all points of the array with coordinates and {x c (i)} determine the array of distances {h (i)} from each point on the scanner substrate z c = 0 to its projection on the object page, as a result, an array of pairs of points {x c (i), h (i )}, determine the coordinate x с0 corresponding to the maximum of the distance array: xc0:h(xc0)=max{h(i)},x c0 : h (x c0 ) = max {h (i)}, анализируют характер массива {xc(i), h(i)} слева и справа от xс0 и определяют, имеет ли объект искажения вблизи переплета или нет.analyze the nature of the array {x c (i), h (i)} to the left and right of x c0 and determine whether the object has distortions near the binding or not. 14. Способ по п.13, отличающийся тем, что в случае, если объект имеет искажения вблизи переплета, определяют данные, характеризующие форму изгиба страниц объекта вблизи переплета, при этом массив {xc(i), h(i)} преобразуют в два массива координат {xc(j), ZcaG)} и {xc(j), zcbG)}, вводят систему координат сканера XsZs, оси которой совпадают с осями системы координат кадра объекта снятого камерой XcZc, массивы координат {xc(j), zcaG)} и {xc(j), zcb(j)} преобразуют в систему координат сканера XsZs:14. The method according to item 13, characterized in that if the object has distortions near the binding, determine the data characterizing the shape of the bending pages of the object near the binding, while the array {x c (i), h (i)} is converted to two coordinate arrays {x c (j), Z ca G)} and {x c (j), z c bG)} introduce the coordinate system of the scanner X s Z s whose axes coincide with the axes of the coordinate system of the frame of the object captured by camera X c Z c , the coordinate arrays {x c (j), z ca G)} and {x c (j), z cb (j)} are converted to the scanner coordinate system X s Z s :
Figure 00000032
Figure 00000032
где а согласует разрешение камеры и сканера по оси X, d согласует разрешение камеры и сканера по оси Z, а также учитывают угол наклона камеры к подложке, где tx переносит начало системы координат, в результате получают массивы координат {xsa(j), zsa(j))} из n элементов и {xsb(j), zsb(j)} из m элементов, определяющие форму изгиба страниц объекта вблизи переплета.where a agrees the resolution of the camera and scanner along the X axis, d agrees the resolution of the camera and scanner along the Z axis, and also takes into account the angle of inclination of the camera to the substrate, where t x transfers the origin of the coordinate system, resulting in coordinate arrays {x sa (j), z sa (j))} of n elements and {x sb (j), z sb (j)} of m elements, which determine the form of bending of the pages of the object near the binding.
15. Способ по п.11, отличающийся тем, что корректируют в модуле коррекции искажений процессора искажения отсканированного изображения объекта при этом корректируют дисторсию и тень в области изгиба страниц изображения объекта.15. The method according to claim 11, characterized in that the distortion correction module of the processor for distorting the scanned image of the object is corrected, while the distortion and shadow in the bending area of the pages of the image of the object are corrected. 16. Способ по п.14, отличающийся тем, что корректируют в модуле коррекции искажений искажения отсканированного изображения объекта, при этом используют кусочно-линейную интерполяцию по массивам координат {xsa(j), zsa(j} и {xsb(j), zsb(j)}, полагают, что количество пикселов каждой строки скорректированного отсканированного изображения объекта превосходит количество пикселов отсканированного изображения на величину Delta, которая задают следующей зависимостью:16. The method according to 14, characterized in that the distortion correction module corrects for distortion of the scanned image of the object, using piecewise linear interpolation over the coordinate arrays {x sa (j), z sa (j} and {x sb (j ), z sb (j)}, it is believed that the number of pixels of each row of the corrected scanned image of the object exceeds the number of pixels of the scanned image by the value Delta, which is specified by the following dependence: Delta=round(La+Lb-(xsb(m)-Xsa(n))),Delta = round (L a + L b - (x sb (m) -X sa (n))), где round - функция округления до ближайшего целого, La и Lb - суммарные длины интерполирующих отрезков, что соответствует количеству пикселов изогнутых частей страниц, при этом La и Lb задают следующей зависимостью:where round is the function of rounding to the nearest integer, L a and L b are the total lengths of the interpolating segments, which corresponds to the number of pixels of the curved parts of the pages, while L a and L b are given by the following dependence:
Figure 00000033
Figure 00000033
Figure 00000034
Figure 00000034
для коррекции дисторсии вдоль интерполированной кривой, образованной сечением изогнутой поверхности страницы объекта, отсчеты выбирают с шагом в единицу длины системы координат сканера, в результате чего определяют соответствующую координату xs', по которой из сканированного изображения вычисляют значения цветовых составляющих R'G'B' скорректированного изображения путем линейной интерполяции по значениям цветовых составляющих пикселов RGB сканированного изображения с координатами floor(xs') и floor(xs')+1, где floor - функция взятия целой части:to correct distortion along the interpolated curve formed by the cross section of the curved surface of the object page, the samples are selected in increments of a unit length of the scanner coordinate system, as a result of which the corresponding coordinate x s 'is determined, from which the values of the color components R'G'B' are calculated from the scanned image corrected image by linear interpolation according to the values of the color components of the RGB pixels of the scanned image with the coordinates floor (x s ') and floor (x s ') +1, where floor is the function of taking the integer part: R'=R(floor(xs'), y)+(xs'-floor(xs'))*R(floor(xs')+1, y),R '= R (floor (x s '), y) + (x s ' -floor (x s ')) * R (floor (x s ') +1, y), для значения G' и В' вычисляют аналогично, текущие координаты отсчетов (xs', zs') вдоль интерполированной отрезками кривой вычисляют по параметрическим уравнениям отрезков прямой от точки с координатами (xsa(i), zsa(i)) до (xsa(i-1), zsa(i-1)), i=2...n:for the values of G 'and B', they are calculated similarly, the current coordinates of the samples (x s ', z s ') along the curve interpolated by the segments are calculated by the parametric equations of the segments of the straight line from the point with coordinates (x sa (i), z sa (i)) to (x sa (i-1), z sa (i-1)), i = 2 ... n: xs'=xsa(i)+t·(xsa(i-1)-xsa(i),x s ' = x sa (i) + t (x sa (i-1) -x sa (i), z×s'=zsa(i)+t·(zsa(i-1)-zsa(i)),z × s ' = z sa (i) + t (z sa (i-1) -z sa (i)), где t=0 в начале отрезка (точка (xsa(i), zsa(i)), t=1 в конце отрезка (точка (xsa(i-1), zsa(i-1)), а шаг изменения t задают выражением:where t = 0 at the beginning of the segment (point (x sa (i), z sa (i)), t = 1 at the end of the segment (point (x sa (i-1), z sa (i-1)), and the change step t is given by the expression:
Figure 00000035
Figure 00000035
вычисления текущих координат отсчетов (xs', zs') вдоль интерполированной кривой для массива {xsb(j), zsb(j)} производят аналогично, устанавливают экспериментально усредненную зависимость яркости искаженного пиксела от яркости исходного пиксела и расстояния до проекции этого пиксела на странице от подложки сканера, далее эту зависимость преобразуют в функцию коррекции искажений отсканированного изображения объекта, учитывающую также и разрешение сканирования:the calculation of the current coordinates of the samples (x s ', z s ') along the interpolated curve for the array {x sb (j), z sb (j)} is carried out similarly, the experimentally averaged dependence of the brightness of the distorted pixel on the brightness of the original pixel and the distance to the projection of this pixels on the page from the scanner substrate, then this dependence is converted into a distortion correction function of the scanned image of the object, which also takes into account the scanning resolution: Y'(x,y)=f(Y(xs',y),zs'),Y '(x, y) = f (Y (x s ', y), z s '), где Y'(x, у) - яркость скорректированного пиксела, Y(xs', у) - яркость пиксела сканированного изображения, xs' - расстояния до страницы от подложки сканера в xs'.where Y '(x, y) is the brightness of the adjusted pixel, Y (x s ', y) is the pixel brightness of the scanned image, x s 'is the distance to the page from the scanner substrate in x s '.
17. Способ по п.11, отличающийся тем, что с помощью модуля коррекции искажений осуществляют коррекцию искажений отсканированного изображения объекта, при этом корректируют искажения в каждой строке сканированного изображения независимо от других строк.17. The method according to claim 11, characterized in that using the distortion correction module, distortions are corrected for the scanned image of the object, and the distortions in each line of the scanned image are corrected independently of other lines.
RU2004129644/09A 2004-10-11 2004-10-11 System and method for scanning RU2298292C2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2004129644/09A RU2298292C2 (en) 2004-10-11 2004-10-11 System and method for scanning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2004129644/09A RU2298292C2 (en) 2004-10-11 2004-10-11 System and method for scanning

Publications (2)

Publication Number Publication Date
RU2004129644A RU2004129644A (en) 2006-03-27
RU2298292C2 true RU2298292C2 (en) 2007-04-27

Family

ID=36388525

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2004129644/09A RU2298292C2 (en) 2004-10-11 2004-10-11 System and method for scanning

Country Status (1)

Country Link
RU (1) RU2298292C2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2653282C2 (en) * 2014-09-18 2018-05-07 Общество с ограниченной ответственностью "Аби Девелопмент" Using built-in scanner software for time saving due to re-scanning rejection

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2653282C2 (en) * 2014-09-18 2018-05-07 Общество с ограниченной ответственностью "Аби Девелопмент" Using built-in scanner software for time saving due to re-scanning rejection

Also Published As

Publication number Publication date
RU2004129644A (en) 2006-03-27

Similar Documents

Publication Publication Date Title
US5760925A (en) Platenless book scanning system with a general imaging geometry
JP3436015B2 (en) Image reading device
US8023743B2 (en) Image processing apparatus and image processing method
US20070053586A1 (en) Image processing apparatus and image processing method
US8390896B2 (en) Image reading method, image reading apparatus, and program recording medium
JPH1013669A (en) Data processing method for image reader
JP2003283804A (en) Method and system for correcting curvature of binding
US20050280849A1 (en) Correcting background color of a scanned image
US20110026818A1 (en) System and method for correction of backlit face images
US20130057926A1 (en) Image compensation in regions of low image contrast
JP3837710B2 (en) Digital camera
JP2009171563A (en) Image processor, image processing method,program for executing image processing method, and storage medium
JP2005260657A (en) Imaging apparatus, image processing method, and program
JP3582988B2 (en) Non-contact image reader
RU2298292C2 (en) System and method for scanning
RU2368091C2 (en) System and method for scanning and copying
JP2010056771A (en) Device and method for reading image, program, and storage medium
JP2000261653A (en) Image processing unit
JPH10173905A (en) Image reading device
JPH10255024A (en) Picture reader
JP3384208B2 (en) Image reading device
JP3684479B2 (en) Digital camera
JPH06205194A (en) Original reader
KR100895622B1 (en) Image forming apparatus and image forming method
JPH1093776A (en) Image reader

Legal Events

Date Code Title Description
MM4A The patent is invalid due to non-payment of fees

Effective date: 20121012