[go: up one dir, main page]

CN118869882A - A scanning image processing method and related equipment - Google Patents

A scanning image processing method and related equipment Download PDF

Info

Publication number
CN118869882A
CN118869882A CN202411124057.2A CN202411124057A CN118869882A CN 118869882 A CN118869882 A CN 118869882A CN 202411124057 A CN202411124057 A CN 202411124057A CN 118869882 A CN118869882 A CN 118869882A
Authority
CN
China
Prior art keywords
page number
page
pixel
image
pixel value
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202411124057.2A
Other languages
Chinese (zh)
Inventor
张芸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Pantum Electronics Co Ltd
Original Assignee
Zhuhai Pantum Electronics Co Ltd
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 Zhuhai Pantum Electronics Co Ltd filed Critical Zhuhai Pantum Electronics Co Ltd
Priority to CN202411124057.2A priority Critical patent/CN118869882A/en
Publication of CN118869882A publication Critical patent/CN118869882A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/0035User-machine interface; Control console
    • H04N1/00405Output means
    • H04N1/00482Output means outputting a plurality of job set-up options, e.g. number of copies, paper size or resolution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/0035User-machine interface; Control console
    • H04N1/00405Output means

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Character Input (AREA)

Abstract

本发明涉及图像形成装置技术领域,尤其涉及一种扫描画像处理方法及相关设备。其中,该方法包括:获取多页扫描画像;识别出每页扫描画像对应的页码编号;根据各页所述扫描画像的页码编号对所述多页扫描画像进行排序;根据所述排序的结果对所述多页扫描画像进行输出。

The present invention relates to the technical field of image forming devices, and in particular to a scanned image processing method and related equipment. The method comprises: obtaining multiple pages of scanned images; identifying the page number corresponding to each page of the scanned images; sorting the multiple pages of scanned images according to the page number of each page of the scanned images; and outputting the multiple pages of scanned images according to the sorting result.

Description

Related equipment of scanning image processing method
Technical Field
The present application relates to the field of image forming apparatuses, and more particularly, to a scanned image processing method and related apparatus.
Background
In an office scenario, there are situations where a large number of paper documents need to be scan archived as electronic versions. In this scenario, users often face the need to sort out the out-of-order documents before they can get the correctly-sorted electronic version scanned documents. The current processing methods for the out-of-order document include two types: the first method is to manually classify and sort paper documents and then scan the paper documents to obtain correctly-sorted scanned documents. And the second is to directly scan the disordered paper document to obtain the disordered scanned document. And then, manually typesetting the disordered scanned documents, and sorting and ordering to obtain the scanned documents with correct ordering. The manual arrangement not only needs to introduce a manual sorting rechecking mechanism, but also needs to further input more manpower. And the processing efficiency of manual sequencing is greatly influenced by the experience level of operators, and the processing efficiency is not high.
Disclosure of Invention
In view of the above, the present application provides a scanned image processing method and related equipment, so as to solve the problems of large manpower resource consumption and low processing efficiency in the manual sorting and arrangement of disordered documents.
In a first aspect, an embodiment of the present invention provides a scanned image processing method, including:
Acquiring a multi-page scanning image;
identifying page numbers corresponding to each page of scanned images;
Sorting the multiple pages of scanned images according to page numbers of the scanned images of each page;
and outputting the multi-page scanned images according to the sequencing result.
In one possible implementation manner, the identifying the page number corresponding to each page of the scanned image includes:
acquiring page position indication information;
determining a corresponding page identification area in the scanned image according to the page position indication information;
The page number of each scanned image is identified from the page number identification area of each scanned image.
In a possible implementation manner, the page number identification area includes a target identification area and a candidate identification area, and before the sorting the multiple pages of scanned images according to the page number of each page of the scanned images, the method further includes:
determining the identification position of the page number of each page of scanned image;
Performing image rotation on the scanned image whose identification position is the candidate identification area; wherein the rotation angle of the image rotation is determined according to the relative position between the candidate recognition area recognizing the page number and the target recognition area.
In one possible implementation manner, the identifying the page number of each page of the scanned image from the page number identification area of each page of the scanned image includes:
Extracting brightness channel data of the page number identification area;
performing image enhancement processing on the brightness channel data; the image enhancement processing at least comprises sharpening processing and/or binarization processing;
and determining the page number according to the brightness channel data after the image enhancement processing.
In one possible implementation, the sharpening process includes:
Determining a pixel value of each pixel point in the brightness channel data, and determining an average pixel value of adjacent pixel points in each direction of each pixel point;
when the pixel value of the pixel point is equal to the corresponding average pixel value, the pixel value of the pixel point is unchanged; when the pixel value of the pixel point is larger than the corresponding average pixel value, increasing the pixel value of the pixel point; and when the pixel value of the pixel point is smaller than the corresponding average pixel value, reducing the pixel value of the pixel point.
In one possible implementation, the binarizing process includes:
Changing the pixel value of the pixel point with the pixel value larger than or equal to the first threshold value in the brightness channel data into a first pixel value; wherein the first pixel value is greater than 0;
And changing the pixel value of the pixel point with the pixel value smaller than the first threshold value in the brightness channel data to 0.
In one possible implementation manner, the determining the page number according to the brightness channel data after the image enhancement processing includes:
detecting pixel values of the brightness channel data after the image enhancement processing row by row and detecting column by column;
determining upper vertex pixels and lower vertex pixels of each page number in the page numbers according to the progressive detection result; and determining left vertex pixels and right vertex pixels of each page number according to the column-by-column detection result;
determining coordinates of a clipping range of each page number according to the coordinates of the upper vertex pixel, the coordinates of the lower vertex pixel, the coordinates of the left vertex pixel and the coordinates of the right vertex pixel corresponding to each page number;
Carrying out image clipping on each page number according to the coordinates of the clipping range of each page number to obtain clipped brightness channel data;
and identifying each page number from the clipped brightness channel data.
In one possible implementation manner, the identifying each page number from the clipped luminance channel data includes:
dividing each pixel point in the clipped brightness channel data into a page number pixel point and a background pixel point according to the pixel value;
Determining intersection points of the page number pixel points and a plurality of preset detection lines;
and determining the page number according to the number and the position of the intersection points.
In one possible implementation, the method further includes:
if there is an abnormal scanned image whose page number is not recognized from the page recognition area in the multi-page scanned images, the abnormal scanned image is inserted to the front of the first page scanned image ordered according to the page number or to the rear of the last page scanned image ordered according to the page number.
In a second aspect, an embodiment of the present invention provides a scanned image processing apparatus including:
The acquisition module is used for acquiring a plurality of pages of scanned images;
the identification module is used for identifying page numbers corresponding to each page of scanned image;
the processing module is used for sorting the multiple pages of scanned images according to page numbers of the scanned images of each page;
And the output module is used for outputting the multi-page scanning images according to the sorting result.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
at least one processor; and
At least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of the first aspect.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing computer instructions that cause a computer to perform the method of the first aspect.
In the embodiment of the invention, the page number is identified from the corresponding position in the scanned images by acquiring the page position indication information set by the user, and then the scanned images are sequenced according to the page number and then output, so that the scanned images with correct sequencing are obtained. The method does not need manual adjustment, increases the standardization degree of scanned images, and improves the processing efficiency.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a scanned image processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a page position according to an embodiment of the present invention;
FIG. 3-a is a schematic diagram of a page recognition area according to an embodiment of the present invention;
FIG. 3-b is a schematic diagram of another page identification area according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a sharpening process according to an embodiment of the present invention;
FIG. 5 is a schematic view of an image capturing according to an embodiment of the present invention;
FIG. 6 is a schematic view of another image capturing according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of page number identification according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of another page number identification according to an embodiment of the present invention;
FIG. 9 is a flowchart of another scan image processing method according to an embodiment of the present invention;
Fig. 10 is a schematic structural diagram of a scanned image processing device according to an embodiment of the present invention.
Fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For a better understanding of the technical solution of the present application, the following detailed description of the embodiments of the present application refers to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one way of describing an association of associated objects, meaning that there may be three relationships, e.g., a and/or b, which may represent: the first and second cases exist separately, and the first and second cases exist separately. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
In order to improve the ordering processing efficiency of disordered manuscripts, the embodiment of the invention provides a scanned image processing method, which is used for ordering scanned images in a mode of identifying page numbers in the scanned images so as to output the scanned images with correct ordering. FIG. 1 is a diagram of a scanned image processing method according to an embodiment of the present invention. The scanning image processing method provided by the embodiment of the invention can be applied to an image forming device with a scanning function. As shown in fig. 1, the method includes:
Step 101, acquiring a multi-page scanned image.
The user sets a multi-page document file in a scanning area of the image forming apparatus, and then clicks a scan key on the image forming apparatus. The image forming apparatus scans a document of a plurality of pages placed in a scanning area in response to a trigger signal of a scanning key to obtain a corresponding scanned image of the plurality of pages.
Step 102, identifying the page number corresponding to each page of scanned image.
In this case, page numbers in the document file are often set at edge positions of the sheet, such as the lower right corner and the lower left corner. Therefore, eight positions of the scanned image, i.e., the upper left, upper middle, upper right, middle left, middle right, lower left, lower middle and lower right, can be identified, and the page number of the scanned image can be obtained.
In some embodiments, the image forming apparatus, after recognizing the page number of each page of the scanned representation, may present the position of the page number in the scanned representation to the user, as confirmed by the user.
In another embodiment, in order to reduce the processing pressure of the image forming apparatus, one recognition position may be designated by the user before recognition, and the image forming apparatus may recognize the position according to the user designation without recognizing all of the eight positions described above. Specifically, the image forming apparatus acquires page position indication information. Then, the image forming apparatus determines a corresponding page recognition area in the scanned image based on the page position indication information. Finally, the image forming apparatus recognizes the page number of each scanned image from the page number recognition area of each scanned image.
The page position indication information is manually set by the user, and is used to indicate that the image forming apparatus identifies a page number from a corresponding position of the scanned representation. The user selects a page position after placing a plurality of pages of original document files to be scanned in a scanning area of the image forming apparatus. The page number positions may include 8 pages: upper left, upper middle, upper right, middle left, middle right, lower left, lower middle and lower right. The user can select the corresponding page number position in the above-described 8 areas according to the actual position of the page number on the original document. The image forming apparatus obtains corresponding page position indication information according to the page position selected by the user. The page position indication information is the same as the page position, and includes 8 positions of upper left, middle upper right, upper left, middle right, middle lower left, middle lower right, and lower right.
Fig. 2 is a schematic diagram of a page position according to an embodiment of the present invention. As shown in fig. 2, corresponding to the above page position indication information, the page identification areas are respectively: region 1, region 2, region 3, region 4, region 5, region 6, region 7, and region 8.
In this case, since document files placed in a scanning area of the image forming apparatus may be arranged in a disordered manner, there may be document files placed upside down. Therefore, when the page number recognition area is determined based on the page number position indication information, two page number recognition areas, one being a target recognition area and the other being a candidate recognition area, can be determined based on the page number position indication information. The position of the target identification area is consistent with the page number identification area, and the candidate identification area is the position of the page number under the condition that the document file is inverted.
Taking the page position indication information as an example of the lower right, fig. 3-a and 3-b show schematic diagrams of the target recognition area and the candidate recognition area among the page recognition areas. When an original document is normally placed in a scanning area of an image forming apparatus, the resulting scanned image is as shown in fig. 3-a. As shown in FIG. 3-a, the page number is located in the lower right corner of the image. And when the document file is placed upside down in the scanning area of the image forming apparatus, the resulting scanned image is as shown in fig. 3-b. As shown in FIG. 3-b, the page number is now located in the upper left corner of the image. The target recognition area is the lower right corner and the candidate recognition area is the upper left corner.
When the document file is a square sheet, each page position indication information corresponds to one target recognition area and three candidate recognition areas. For example, if the page position indication information is the middle-upper, the corresponding target recognition areas are the middle-upper, and the candidate recognition areas are respectively: left middle, right middle, middle lower.
Step 103, sorting the multi-page scanned images according to the page numbers of the respective page scanned images.
Wherein, the scanned images of each page can be ordered in the order of the page numbers from small to large. Or the page scan images may be sorted in order of page numbers from large to small.
Wherein the identification position of the page number of each scanned image needs to be determined before sorting. Since the scanned images whose recognition positions are candidate recognition areas are described as upside down, it is necessary to rotate the scanned images whose recognition positions are candidate recognition areas before sorting. The rotation angle of the image rotation is determined according to the relative position between the candidate recognition area recognizing the page number and the target recognition area. After the rotation, the inverted scanned images are restored to the normal state, and then the multi-page scanned images are sorted according to page numbers.
Taking the case shown in fig. 3-b as an example, the page position indication information is lower right, and since the original document corresponding to the page scanned image is placed upside down on the scanned area, the page number cannot be recognized from the target recognition area (i.e., lower right). But the page number can be recognized from the candidate recognition area (i.e., upper left), so that the scan image of the page needs to be rotated clockwise by 180 °.
Taking the original document as a square, the page number recognition area is taken as the lower left as an example. Page number recognition is performed on each of four corners of the scanned image. The lower left is the target recognition area, and the remaining triangles are candidate recognition areas. When the page number is recognized from the lower left, no image rotation is performed. When the page number is recognized from the lower right, the scan image needs to be rotated clockwise by 90 °. When the page number is recognized from the upper right, the scan image needs to be rotated clockwise by 180 °. When the page number is recognized from the upper left, the scan image needs to be rotated clockwise by 270 °.
And 104, outputting the multi-page scanned image according to the sequencing result.
After each page of scanned images is sequenced, the pages of scanned images in positive sequence or flashback are printed out or output to other terminals for storage.
In some embodiments, if there are abnormal scanned images whose page numbers are not recognized from the page recognition area among the plurality of page scanned images, the abnormal scanned images may be inserted in front of the scanned images sorted according to the page numbers when sorting is performed. Or the abnormal scan image is inserted to the rear of the tail page scan image ordered according to the page number. Wherein the first page scanned image is the first scanned image in the scanned images ordered according to page numbers. The last scan image among the scan images ordered according to page numbers is the last scan image among the end page scan images. For example, a total of 5 scanned images are obtained, and after page number recognition is performed, 4 scanned images with page numbers 1 to 4 and 1 abnormal scanned image with no page number recognized are obtained. The result of ordering it may be: scanned image with page number 1, scanned image with page number 2, scanned image with page number 3, scanned image with page number 4, and abnormal scanned image. Or the ordered result may be: abnormal scan image- & gt scan image with page number 1- & gt scan image with page number 2- & gt scan image with page number 3- & gt scan image with page number 4.
In some embodiments, the image data in the page recognition area may be preprocessed before page recognition to increase the accuracy of page recognition. And then determining the page number according to the image data of the preprocessed page number identification area.
Specifically, the preprocessing may be specifically implemented as performing image enhancement processing on the page number recognition area, and the image enhancement processing may include sharpening processing and/or binarization processing. Since both the sharpening process and the binarization process are only required to process for the image brightness. The image data of the page number recognition area can be color space converted first. Converting it from RGB color space to YCbCr color space. In YCbCr, Y represents the brightness and density of the color, cb represents the shift amount of the blue density in the color, and Cr represents the shift amount of the red density in the color. Luminance channel data, i.e., Y-channel data, of the image data of the page number recognition area can then be extracted. And then carrying out image enhancement processing on the brightness channel data, and finally determining the page number according to the brightness channel data after the image enhancement processing.
In the sharpening process, for each pixel in the luminance channel, the pixel value of the pixel itself may be determined and denoted as a. And determining the average value of the adjacent pixel points in all directions of the pixel point, and marking the average value as a1. Taking the four directions of up, down, left and right as an example, the pixel values of the adjacent pixels in the four directions of up, down, left and right adjacent to the pixel are denoted as b, c, d and e, respectively. The average of b, c, d and e is then calculated as a1. The own pixel value a and the neighborhood average pixel value a1 of each pixel point can be obtained. And then for each pixel point, adjusting the value of a according to the size relation between a and a1. When the pixel value a of the pixel point is equal to the corresponding average pixel a1, the pixel value a of the pixel point is unchanged. When the pixel value a of the pixel point is larger than the corresponding average pixel a1, the pixel value a of the pixel point is increased, that is, the value of a becomes larger. When the pixel value a of the pixel point is smaller than the corresponding average pixel a1, the pixel value a of the pixel point is reduced, that is, the value of a becomes smaller. Thus, the sharpening process is completed after each pixel point in the brightness channel data is adjusted.
In one specific example, the luminance channel data obtained in the above may be subjected to image sharpening processing using a laplacian or other means. The Laplacian is the basis of the calculation of the pixel gray level difference in the image neighborhood, and is an image neighborhood enhancement algorithm derived by second order differentiation, the basic idea is that when the gray level of the central pixel of the neighborhood is lower than the average gray level of other pixels in the neighborhood where the central pixel is located, the gray level of the central pixel should be further reduced. When higher than the center pixel, the gray scale of the center pixel is further increased, thereby realizing the image sharpening process. In the implementation process of the Laplace algorithm, the gradient is calculated in four directions or eight directions of a central pixel of the neighborhood, the gradient sum is added to judge the relation between the central pixel value and the gray level of other pixels in the neighborhood, and the pixel value is adjusted by using the result of gradient operation. The embodiment of the invention provides a Laplace four-aspect template, which comprises the following steps:
The sharpening process using this laplace square template is shown in fig. 4. A central pixel value=a×p is calculated from the pixel values of the central pixel P11 and other pixels in the neighborhood thereof. Wherein A is a debilitating factor. P=p00×0+p01× (-1) +p02×0+p10× (-1) +p11) X4+P12× (-1) +P20×0+P21× (-1) +P22×0. When the pixel values in the neighborhood are the same, the pixel value of the central pixel P11 is equal to the pixel value of the central pixel P11, and the calculated central pixel value is equal to the pixel value of the central pixel P11. When the other pixel values in the neighborhood are higher than the pixel value of the center pixel P11, the calculated center pixel value is lower than the pixel value of the center pixel P11 itself, and the pixel value of P11 is reduced to the calculated center pixel value. When the pixel value in the field is lower than the pixel value of the center pixel P11, the calculated center pixel value is higher than the pixel value of the center pixel P11 itself, and the pixel value of P11 is increased to the calculated center pixel value. Through the steps, sharpening processing of the brightness channel data is realized.
For binarization processing. Specifically, the pre-processed luminance channel data may be binarized by setting a first threshold value. Specifically, the pixel value of the pixel point with the pixel value larger than or equal to the first threshold value in the brightness channel data is changed to the first pixel value. And the first pixel value is greater than 0. And changing the pixel value of the pixel point with the pixel value smaller than the first threshold value in the brightness channel data to 0. The pixel points of the brightness channel after the binarization processing only have two pixel values, namely, the pixel value is 0 and the pixel value is the first pixel value.
For example, when the pixel value of each pixel after the preprocessing is equal to or greater than the first threshold, the value of the pixel value is changed to 1. And changing the pixel value of the pixel point with the pixel value smaller than the first threshold value to 0. Thus, the brightness channel data composed of a plurality of pixel points with the pixel value of 0 or 1 can be obtained. Thus, binarization processing is completed, and effective data is reserved while pixels needing to be calculated are reduced.
In some embodiments, sharpening may be performed before binarization. Since the sharpening process will enhance and highlight contours, edges, and certain linear target element features in the image. The contrast between the page number and the surrounding background can be improved after the sharpening process. The sharpening process is advanced before the binarization process, and it is possible to avoid erroneous division of the pixel points of the background portion having a higher pixel value into page numbers (i.e., the pixel value becomes 1) at the time of the binarization process. It is possible to avoid missing pixel points belonging to the page number having a lower pixel value (i.e., the pixel value becomes 0) when binarizing processing is performed.
The luminance channel data subjected to the image enhancement processing in the page number recognition area may then be truncated so as to recognize the page number therefrom. First, pixel values of luminance channel data after image enhancement processing may be detected row by row and column by column. And determining an upper vertex pixel and a lower vertex pixel of each page number in the page numbers according to the row-by-row detection result. And determining left vertex pixels and right vertex pixels of each page number according to the detection result of the column by column. And then determining the coordinates of the clipping range of each page number according to the coordinates of the upper vertex pixel, the coordinates of the lower vertex pixel, the coordinates of the left vertex pixel and the coordinates of the right vertex pixel corresponding to each page number. And carrying out image clipping on each page number according to the coordinates of the clipping range of each page number to obtain clipped brightness channel data. And finally, identifying each page number from the clipped brightness channel data. Wherein, since the clipping range is a rectangular range, the coordinates of the clipping range can be realized in the form of the coordinate values of two corner points of the rectangle. For example, the coordinates of the clipping range include a combination of coordinates of the top-left corner vertex and coordinates of the bottom-right corner vertex of the clipping range. It may also be a combination of the coordinates of the upper right corner vertex and the coordinates of the lower left corner vertex.
FIG. 5 is a schematic view of an image capturing process according to an embodiment of the present invention. As shown in fig. 5, each row of pixels and each column of pixels of the left page number recognition area are detected, thereby obtaining 6 edge pixel points (i.e., an upper vertex pixel, a lower vertex pixel, a left vertex pixel, and a right vertex pixel) indicated by arrows shown on the left side in fig. 5. After the edge pixel point position is obtained, the image is intercepted after the fixed pixel value is reserved on the basis of the edge pixel point, and an intercepting area shown on the right side in fig. 5 is obtained. So that the page number is located in the middle in the cut-out area. And finally, identifying each page number in the clipped brightness channel data. Wherein, a digital recognition model based on a deep learning network can be adopted to recognize each page number from the intercepted brightness channel data.
For the case that the page number is more than two digits, a mode of independently intercepting the digits of each page number and respectively identifying the digits is adopted. FIG. 6 is a schematic view of another image capturing according to an embodiment of the present invention. As shown in fig. 6, the page number is 57, and then the two-bit page number may be truncated, resulting in two truncated areas shown on the right side in fig. 6. Wherein the multi-bit page number may be truncated according to the pixel value characteristics of the whole column. When detecting that the pixel values in the whole column are all the same value (namely, the pixel value is 0), the adjacent multi-bit page numbers can be intercepted.
In some embodiments, the page number may also be identified by using a simpler detection line, as opposed to a complex detection scheme of the deep learning network. The number of the page number is judged by the number of intersections between the page number and the detection line and the positions of the intersections. Specifically, each pixel point in the clipped luminance channel data may be divided into a page number pixel point and a background pixel point according to the pixel value. The pixel having the pixel value of the first pixel value is determined as the page number pixel and the pixel having the pixel value of 0 is determined as the background pixel. Taking the truncated area after binarization processing in the above embodiment as an example, a pixel point with a value of 1 of the pixel value P may be determined as a page number pixel point. And determining the pixel point with the value of the pixel value P being 0 as a background pixel point. And then determining intersection points of the page number pixel points and a plurality of preset detection lines. Finally, the page number is determined according to the number and the position of the intersection points. Fig. 7 is a schematic diagram of page number identification according to an embodiment of the present invention. As shown in fig. 7, three preset detection lines are provided in total. Two preset detection lines (X1 and X2) in the horizontal direction and one preset detection line Y1 in the vertical direction. The number of intersection points and the position of the intersection points of different numbers and fixed preset detection lines are different. Fig. 8 shows the intersection of different numbers with each preset detection line. As shown in fig. 8, the number of intersections between the different numbers shown in table 1-1 and the respective preset detection lines can be obtained.
TABLE 1-1
As shown in table 1-1, the numbers except for the numbers 2, 3, and 5 may be determined based on only the number of intersections with the three preset detection lines. For numbers 2, 3, 5, further judgment is required according to the position of the intersection point. Specifically, the intersection point of the number 2 and X1 is located on the right side of Y1, and the intersection point of the number 2 and X2 is located on the left side of Y1. The intersection of the number 3 with X1 is to the right of Y1 and the intersection with X2 is to the right of Y1. The intersection point of the number 5 and X1 is located on the left side of Y1 and the intersection point of the number 2 and X2 is located on the right side of Y1. As described above, the number of intersections and the positions of the intersections can be used to obtain the corresponding page numbers.
In one specific example, an embodiment of the present invention provides a flowchart of another scanned image processing method. As shown in fig. 9, the method includes:
in step 901, a user places an original document in a scanning area of an image forming apparatus.
At step 902, the user selects a page number location.
The user selects a corresponding page position from a plurality of page positions according to the actual position of the page in the original.
Step 903, the user clicks a button to start the sorting scan.
In step 904, the image forming apparatus starts scanning to obtain a one-page scanned image.
After a user clicks a button for starting the sequence scanning, the image forming apparatus scans the original document placed in the scanning area page by page, and obtains a corresponding one-page scanned image every time one-page scanning is completed.
In step 905, the image forming apparatus determines the range of the corresponding page recognition area on the scanned image in accordance with the user selection of the page position, and copies the scanned image of the page recognition area to perform page recognition.
Step 906, preprocessing the page number identification area. Specifically, color space conversion is sequentially performed, luminance channel data is extracted, sharpening processing, binarization processing, and image cropping are performed.
In step 907, the image forming apparatus performs page number recognition. And identifying the page number by judging the number and the position of the intersection points of the page number pixel points and the three preset detection lines.
Step 908, it is determined whether a valid page number is obtained, and if a valid page number is identified, step 909 is executed. If no valid page number is identified, step 910 is performed.
Step 909, determining whether the valid page number is in the target recognition area. If yes, step 911 is performed, and if the valid page number is in the candidate recognition area, step 912 is performed.
Step 910, the page scan image is placed before the page-numbered positive-sequence scan image or after the positive-sequence scan image.
At step 911, the page scanned image is inserted into the image sequence according to page number.
Step 912, image rotation is performed. The page scanned image is rotated to a positive position and then inserted into the image sequence based on the page number.
Step 913, judging whether the scanning is completed, if yes, outputting a positive sequence scanned image according to the image sequence. If not, continuing scanning the original of the next page.
In response to the above-described scan image processing method, an embodiment of the present invention provides a scan image processing apparatus. Fig. 10 is a schematic structural diagram of a scanned image processing device according to an embodiment of the present invention. As shown in fig. 10, the apparatus includes: an acquisition module 1001, an identification module 1002, a processing module 1003, and an output module 1004.
An acquisition module 1001 is configured to acquire a multi-page scanned image.
The identifying module 1002 is configured to identify a page number corresponding to each page of scanned image.
A processing module 1003 for sorting the multi-page scanned images according to page numbers of the respective page scanned images.
And an output module 1004 for outputting the multi-page scanned image according to the sorting result.
The scanned image processing device provided in the embodiment shown in fig. 10 may be used to implement the technical solutions of the method embodiments shown in fig. 1 to fig. 9 in the present specification, and the implementation principle and technical effects may be further described with reference to the related descriptions in the method embodiments.
Fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where, as shown in fig. 11, the electronic device may include at least one processor and at least one memory communicatively connected to the processor, where: the memory stores program instructions executable by the processor, which can be invoked by the processor to perform the scanned image processing method provided in the embodiments shown in fig. 1-9 of the present specification.
As shown in fig. 11, the electronic device is in the form of a general purpose computing device. Components of an electronic device may include, but are not limited to: one or more processors 1110, a communication interface 1120, and a memory 1130, a communication bus 1140 that connects the various system components, including the memory 1130, the communication interface 1120, and the processor 1110.
Communication bus 1140 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include industry Standard architecture (I ndustry STANDARD ARCH itecture; hereinafter ISA) bus, micro channel architecture (Micro CHANNE L ARCH itecture; hereinafter MAC) bus, enhanced ISA bus, video electronics standards Association (Video E lectron ICS STANDARDS Associat ion; hereinafter VESA) local bus, and peripheral component interconnect (PER IPHERA L Component I nterconnect ion; hereinafter PCI) bus.
Electronic devices typically include a variety of computer system readable media. Such media can be any available media that can be accessed by the electronic device and includes both volatile and nonvolatile media, removable and non-removable media.
The memory 1130 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory; hereinafter: RAM) and/or cache memory. The electronic device may further include other removable/non-removable, volatile/nonvolatile computer system storage media. Memory 1130 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the embodiments of the present description.
A program/utility having a set (at least one) of program modules may be stored in the memory 1130, such program modules include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules typically carry out the functions and/or methods of the embodiments described herein.
The processor 1110 executes programs stored in the memory 1130 to perform various functional applications and data processing, such as implementing the scanned image processing method provided in the embodiment shown in fig. 1-9 of the present specification.
Embodiments of the present disclosure provide a computer-readable storage medium storing computer instructions that cause a computer to execute the scanned image processing method provided in the embodiments shown in fig. 1 to 9 of the present disclosure.
Any combination of one or more computer readable media may be utilized as the above-described computer readable storage media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (Read On ly Memory; hereinafter ROM), an erasable programmable read-only memory (Erasab le Programmab le Read On ly Memory; hereinafter EPROM) or flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present specification. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present specification, the meaning of "plurality" means at least two, for example, two, three, etc., unless explicitly defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and additional implementations are included within the scope of the preferred embodiment of the present specification in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present specification.
Depending on the context, the word "if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
It should be noted that the devices according to the embodiments of the present disclosure may include, but are not limited to, a personal Computer (Persona lComputer; hereinafter referred to as a PC), a personal digital assistant (Persona L DIGITA L ASS I STANT; hereinafter referred to as a PDA), a wireless handheld device, a tablet Computer (Tab Computer), a mobile phone, an MP3 display, an MP4 display, and the like.
In the several embodiments provided in this specification, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the elements is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
In addition, each functional unit in each embodiment of the present specification may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a connector, or a network device, etc.) or a Processor (Processor) to perform part of the steps of the methods described in the embodiments of the present specification. And the aforementioned storage medium includes: u disk, mobile hard disk, read-only Memory (ROM), random access Memory (Random Access Memory; RAM), magnetic disk or optical disk, etc.
The foregoing description of the preferred embodiments is provided for the purpose of illustration only, and is not intended to limit the scope of the disclosure, since any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the disclosure are intended to be included within the scope of the disclosure.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and reference should be made to the description in the method embodiment for relevant points.

Claims (12)

1.一种扫描画像处理方法,其特征在于,包括:1. A scanning image processing method, characterized in that it includes: 获取多页扫描画像;Get multiple pages of scanned images; 识别出每页扫描画像对应的页码编号;Identify the page number corresponding to each page of the scanned image; 根据各页所述扫描画像的页码编号对所述多页扫描画像进行排序;Sorting the plurality of pages of scanned images according to the page numbers of the scanned images on each page; 根据所述排序的结果对所述多页扫描画像进行输出。The multiple pages of scanned images are outputted according to the sorting result. 2.根据权利要求1所述的方法,其特征在于,所述识别出每页扫描画像对应的页码编号,包括:2. The method according to claim 1, wherein the step of identifying the page number corresponding to each page of the scanned image comprises: 获取页码位置指示信息;Get page position indication information; 根据所述页码位置指示信息在所述扫描画像中确定对应的页码识别区域;Determine a corresponding page number recognition area in the scanned image according to the page number position indication information; 从每页扫描画像的页码识别区域中识别出每页扫描画像的页码编号。The page number of each page of the scanned image is recognized from the page number recognition area of each page of the scanned image. 3.根据权利要求2所述的方法,其特征在于,所述页码识别区域包括目标识别区域和候选识别区域,所述根据各页所述扫描画像的页码编号对所述多页扫描画像进行排序之前,所述方法还包括:3. The method according to claim 2, wherein the page number recognition area includes a target recognition area and a candidate recognition area, and before sorting the plurality of pages of scanned images according to the page numbers of the scanned images of each page, the method further comprises: 确定所述各页扫描画像的页码编号的识别位置;Determining the identification position of the page number of each page of the scanned image; 对识别位置为所述候选识别区域的所述扫描画像进行画像旋转;其中,所述画像旋转的旋转角度根据识别出所述页码编号的候选识别区域与所述目标识别区域之间的相对位置确定。The scanned image whose identification position is the candidate identification area is rotated; wherein the rotation angle of the image rotation is determined according to the relative position between the candidate identification area where the page number is identified and the target identification area. 4.根据权利要求2所述的方法,其特征在于,所述从每页扫描画像的页码识别区域中识别出每页扫描画像的页码编号,包括:4. The method according to claim 2, wherein the step of identifying the page number of each page of the scanned image from the page number identification area of each page of the scanned image comprises: 提取所述页码识别区域的亮度通道数据;Extracting brightness channel data of the page number recognition area; 对所述亮度通道数据进行图像增强处理;所述图像增强处理至少包括锐化处理和/或二值化处理;Performing image enhancement processing on the brightness channel data; the image enhancement processing at least includes sharpening processing and/or binarization processing; 根据所述图像增强处理后的亮度通道数据确定所述页码编号。The page number is determined according to the brightness channel data after the image enhancement processing. 5.根据权利要求4所述的方法,其特征在于,所述锐化处理,包括:5. The method according to claim 4, characterized in that the sharpening process comprises: 确定所述亮度通道数据中的每个像素点自身的像素值,以及确定每个像素点各个方向的相邻像素点的平均像素值;Determine the pixel value of each pixel in the brightness channel data, and determine the average pixel value of adjacent pixels in each direction of each pixel; 当所述像素点自身的像素值等于对应的所述平均像素值时,所述像素点自身的像素值不变;当所述像素点自身的像素值大于对应的所述平均像素值时,增加所述像素点自身的像素值;当所述像素点自身的像素值小于对应的所述平均像素值时,减少所述像素点自身的像素值。When the pixel value of the pixel point itself is equal to the corresponding average pixel value, the pixel value of the pixel point itself remains unchanged; when the pixel value of the pixel point itself is greater than the corresponding average pixel value, the pixel value of the pixel point itself is increased; when the pixel value of the pixel point itself is less than the corresponding average pixel value, the pixel value of the pixel point itself is reduced. 6.根据权利要求4所述的方法,其特征在于,所述二值化处理,包括:6. The method according to claim 4, characterized in that the binarization process comprises: 将所述亮度通道数据中像素值大于或等于第一阈值的像素点的像素值变更为第一像素值;其中,所述第一像素值大于0;Change the pixel value of a pixel point in the brightness channel data whose pixel value is greater than or equal to a first threshold to a first pixel value; wherein the first pixel value is greater than 0; 将所述亮度通道数据中像素值小于所述第一阈值的像素点的像素值变更为0。The pixel values of the pixels in the brightness channel data whose pixel values are less than the first threshold are changed to 0. 7.根据权利要求4所述的方法,其特征在于,所述根据所述图像增强处理后的亮度通道数据确定所述页码编号,包括:7. The method according to claim 4, characterized in that the step of determining the page number according to the brightness channel data after the image enhancement process comprises: 对所述图像增强处理后的亮度通道数据的像素值进行逐行检测以及逐列检测;Performing row-by-row and column-by-column detection on the pixel values of the brightness channel data after the image enhancement processing; 根据所述逐行检测的结果确定所述页码编号中每位页码编号的上部顶点像素以及下部顶点像素;以及,根据所述逐列检测的结果确定每位页码编号的左部顶点像素以及右部顶点像素;Determine the upper vertex pixel and the lower vertex pixel of each page number in the page number according to the result of the row-by-row detection; and determine the left vertex pixel and the right vertex pixel of each page number according to the result of the column-by-column detection; 根据所述每位页码编号对应的上部顶点像素的坐标、下部顶点像素的坐标、左部顶点像素的坐标以及右部顶点像素的坐标确定每位页码编号的裁剪范围的坐标;Determine the coordinates of the clipping range of each page number according to the coordinates of the upper vertex pixel, the lower vertex pixel, the left vertex pixel and the right vertex pixel corresponding to each page number; 根据所述每位页码编号的裁剪范围的坐标对每位页码编号进行画像裁剪,得到裁剪后的亮度通道数据;Perform image cropping on each page number according to the coordinates of the cropping range of each page number to obtain cropped brightness channel data; 从所述裁剪后的所述亮度通道数据中识别出每位页码编号。A page number is identified for each bit from the clipped brightness channel data. 8.根据权利要求7所述的方法,其特征在于,所述从所述裁剪后的所述亮度通道数据中识别出每位页码编号,包括:8. The method according to claim 7, wherein the step of identifying each page number from the clipped brightness channel data comprises: 根据像素值将所述裁剪后的所述亮度通道数据中的各个像素点划分为页码编号像素点以及背景像素点;Dividing each pixel point in the clipped brightness channel data into a page number pixel point and a background pixel point according to the pixel value; 确定所述页码编号像素点与多条预设检测线的交点;Determine the intersection of the page number pixel point and a plurality of preset detection lines; 根据所述交点的数量以及位置确定所述页码编号。The page number is determined according to the number and position of the intersections. 9.根据权利要求2所述的方法,其特征在于,所述方法还包括:9. The method according to claim 2, characterized in that the method further comprises: 若所述多页扫描画像中存在未能从所述页码识别区域中识别出页码编号的异常扫描画像,则将所述异常扫描画像插入到根据页码编号排序的首页扫描画像的前方或者根据页码编号排序的尾页扫描画像的后方。If there is an abnormal scan image in the multiple pages of scan images whose page number cannot be identified in the page number recognition area, the abnormal scan image is inserted in front of the first page scan image sorted by page number or behind the last page scan image sorted by page number. 10.一种扫描画像处理装置,其特征在于,包括:10. A scanning image processing device, comprising: 获取模块,用于获取多页扫描画像;An acquisition module is used to acquire multiple pages of scanned images; 识别模块,用于识别出每页扫描画像对应的页码编号;A recognition module, used to recognize the page number corresponding to each page of the scanned image; 处理模块,用于根据各页所述扫描画像的页码编号对所述多页扫描画像进行排序;A processing module, used for sorting the multiple pages of scanned images according to the page numbers of the scanned images on each page; 输出模块,用于根据所述排序的结果对所述多页扫描画像进行输出。An output module is used to output the multiple pages of scanned images according to the sorting result. 11.一种电子设备,其特征在于,包括:11. An electronic device, comprising: 至少一个处理器;以及at least one processor; and 与所述处理器通信连接的至少一个存储器,其中:at least one memory in communication with the processor, wherein: 所述存储器存储有可被所述处理器执行的程序指令,所述处理器调用所述程序指令能够执行如权利要求1至9任一所述的方法。The memory stores program instructions executable by the processor, and the processor can execute the method according to any one of claims 1 to 9 by calling the program instructions. 12.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行如权利要求1至9任一所述的方法。12. A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute any one of the methods according to claims 1 to 9.
CN202411124057.2A 2024-08-15 2024-08-15 A scanning image processing method and related equipment Pending CN118869882A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411124057.2A CN118869882A (en) 2024-08-15 2024-08-15 A scanning image processing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411124057.2A CN118869882A (en) 2024-08-15 2024-08-15 A scanning image processing method and related equipment

Publications (1)

Publication Number Publication Date
CN118869882A true CN118869882A (en) 2024-10-29

Family

ID=93161939

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411124057.2A Pending CN118869882A (en) 2024-08-15 2024-08-15 A scanning image processing method and related equipment

Country Status (1)

Country Link
CN (1) CN118869882A (en)

Similar Documents

Publication Publication Date Title
CN110046529B (en) Two-dimensional code identification method, device and equipment
CN110516201B (en) Image processing method, image processing device, electronic equipment and storage medium
CN103714327B (en) Method and system for correcting image direction
WO2020252920A1 (en) Picture correction method and apparatus, computer device and computer-readable storage medium
EP2974261A2 (en) Systems and methods for classifying objects in digital images captured using mobile devices
CN110647882A (en) Image correction method, device, equipment and storage medium
EP2605186B1 (en) Method and apparatus for recognizing a character based on a photographed image
CN108965646B (en) Image processing apparatus, image processing method, and program
CN112651953B (en) Picture similarity calculation method and device, computer equipment and storage medium
CN112597940B (en) Certificate image recognition method and device and storage medium
CN109948521B (en) Image deviation rectifying method and device, equipment and storage medium
CN111259891B (en) Method, device, equipment and medium for identifying identity card in natural scene
CN110569818A (en) intelligent reading learning method
CN110555435A (en) Point-reading interaction realization method
CN110210467B (en) Formula positioning method of text image, image processing device and storage medium
CN111213157A (en) Express information input method and system based on intelligent terminal
CN111178365A (en) Picture character recognition method and device, electronic equipment and storage medium
CN113221897A (en) Image correction method, image text recognition method, identity verification method and device
US11176363B2 (en) System and method of training a classifier for determining the category of a document
CN108090728B (en) Express information input method and system based on intelligent terminal
CN112434640B (en) Method, device and storage medium for determining rotation angle of document image
CN113840135A (en) Color cast detection method, device, equipment and storage medium
CN118869882A (en) A scanning image processing method and related equipment
JP4967045B2 (en) Background discriminating apparatus, method and program
CN113129298A (en) Definition recognition method of text image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination