Pixel data determination method, apparatus, and electronic device

The method uses a line scan sensor with parallel photosensitive chips and color correction to address color edges in image data, ensuring accurate pixel data determination by normalizing area ranges.

JP2025523978AInactive Publication Date: 2025-07-25WEIHAI HUALING OPTO ELECTRONICS CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2025502929
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-11-24
Filing Date
2023-06-27
Publication Date
2025-07-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing methods using line scan linear array sensors in industrial detection and machine vision fields often result in color edges during image determination, hindering accurate image recognition.

Method used

A method involving a line scan sensor with three photosensitive chips arranged in parallel, scanning pixel rows at different positions, and using color correction coefficients to determine pixel data based on multiple scans from each chip, eliminating color edges.

Benefits of technology

The method ensures accurate pixel data determination by normalizing area ranges, eliminating color edges and enhancing the precision of image data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025523978000001_ABST
    Figure 2025523978000001_ABST
Patent Text Reader

Abstract

The present invention discloses a pixel data determination method, apparatus, and electronic device. Among them, the method includes: transmitting a pixel data collection command to a line scan sensor; receiving first photosensitive pixel data corresponding to a target pixel row transmitted from the line scan sensor; cyclically and sequentially transmitting a moving planned pixel row command and a pixel data collection command to the line scan sensor until second photosensitive pixel data and third photosensitive pixel data corresponding to the target pixel row transmitted from the line scan sensor are received; and determining target pixel data corresponding to the target pixel row based on a color correction coefficient corresponding to the line scan sensor, the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row. The present invention solves the problem that color edges exist in the target pixel data when determining the target pixel data corresponding to the target pixel row in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and specifically to a method, apparatus, and electronic device for determining pixel data.

Background Art

[0002] Currently, the industrial detection field and the machine vision field mainly adopt two methods: adding various light sources to an area camera and using a line scan linear array sensor. The linear array sensor performs linear scanning, has a wide width, a compact structure, saves space, and has advantages such as a 1:1 image without distortion. Such a linear array camera has a line scan camera composed of three columns of red, green, and blue color chips. Each pixel point is composed of three pixel data of red, green, and blue. In the scanning process, a single pixel point is exposed multiple times, and it is composed of three-color photosensitive chips of red, green, and blue, and a color image can be formed when white light is lit only once. However, when using this method to determine a color image, it is easy to cause color edges in the determined image, which hinders the determination and recognition of the final image.

[0003] For the above problems, currently, no effective solution has been proposed.

Summary of the Invention

Problems to be Solved by the Invention

[0004] Embodiments of the present invention provide a method, apparatus, and electronic device for determining pixel data so as to solve the problem that color edges exist in target pixel data when determining target pixel data corresponding to a target pixel row in at least related technologies.

Means for Solving the Problems

[0005] According to one aspect of an embodiment of the present invention, there is provided a method for determining pixel data, comprising: transmitting a pixel data collection command to a line scan sensor, wherein the line scan sensor includes three photosensitive chips arranged in parallel, and the three photosensitive chips respectively correspond to three colors, and the pixel data collection command is used to scan pixel rows corresponding to the three photosensitive chips at different positions; receiving first photosensitive pixel data corresponding to a target pixel row transmitted from the line scan sensor, wherein the first photosensitive pixel data is photosensitive pixel data scanned by a first position photosensitive chip, and when acquiring the first photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the first position photosensitive chip; sequentially and cyclically transmitting a planned moving pixel row command and the pixel data collection command to the line scan sensor until receiving second photosensitive pixel data and third photosensitive pixel data corresponding to the target pixel row transmitted from the line scan sensor, wherein the second photosensitive pixel data is photosensitive pixel data scanned by a second position photosensitive chip, and the third photosensitive pixel data is photosensitive pixel data scanned by a third position photosensitive chip, and when acquiring the second photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the second position photosensitive chip, and when acquiring the third photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the third position photosensitive chip; and determining the target pixel data corresponding to the target pixel row based on a color correction coefficient corresponding to the line scan sensor, the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row.

[0006] Preferably, before the step of transmitting the pixel data collection command to the line scan sensor, further comprising: obtaining a scanning region in which the line scan sensor scans the object to be scanned; determining an initial scanning position of the scanning sensor based on the scanning region; and transmitting a position adjustment command to the line scan sensor, wherein the initial scanning position is attached to the position adjustment command.

[0007] Preferably, after the step of determining the target pixel data corresponding to the target pixel row based on the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row, further comprising: determining an end scanning position of the scanning sensor based on the scanning region; determining all pixel rows passing from the initial scanning position to the end scanning position; cyclically and sequentially transmitting the moving planned pixel row command and the pixel data collection command to the line scan sensor until receiving the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data respectively corresponding to all the pixel rows transmitted from the line scan sensor; and determining image data corresponding to the scanning region based on the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data respectively corresponding to all the pixel rows.

[0008] Preferably, before the step of transmitting the pixel data collection command to the line scan sensor, further comprising: determining a moving pixel row; and determining the pixel data collection command and the moving planned pixel row command based on the moving pixel row.

[0009] Preferably, the step of determining the moving pixel row includes: obtaining a target resolution; and determining the target moving pixel row based on the target resolution.

[0010] Preferably, before the step of determining the target pixel data corresponding to the target pixel row based on the color correction coefficient corresponding to the line scan sensor, the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row, the method includes a step of obtaining the color correction coefficient corresponding to the line scan sensor.

[0011] Preferably, the three photosensitive chips include a blue light photosensitive chip, a green light photosensitive chip, and a red light photosensitive chip.

[0012] According to one aspect of an embodiment of the present invention, there is provided a pixel data determination device including: a transmission module configured to send a pixel data collection command to a line scan sensor, wherein the line scan sensor includes three photosensitive chips at different positions, and the pixel data collection command is used to scan pixel rows corresponding to the three photosensitive chips at different positions respectively; a reception module configured to receive first photosensitive pixel data corresponding to a target pixel row transmitted from the line scan sensor, wherein the first photosensitive pixel data is photosensitive pixel data scanned by a first-position photosensitive chip, and when acquiring the first photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the first-position photosensitive chip; a transmission and reception module configured to cyclically and sequentially send a planned moving pixel row command and the pixel data collection command to the line scan sensor until receiving second photosensitive pixel data and third photosensitive pixel data corresponding to the target pixel row transmitted from the line scan sensor, wherein the second photosensitive pixel data is photosensitive pixel data scanned by a second-position photosensitive chip, the third photosensitive pixel data is photosensitive pixel data scanned by a third-position photosensitive chip, when acquiring the second photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the second-position photosensitive chip, and when acquiring the third photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the third-position photosensitive chip; and a determination module configured to determine target pixel data corresponding to the target pixel row based on the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row.

[0013] According to one aspect of an embodiment of the present invention, there is provided an electronic device including a processor and a memory configured to store commands executable by the processor, wherein the processor is configured to execute the commands to implement the pixel data determination method according to any one of the above items.

[0014] According to one aspect of an embodiment of the present invention, there is provided a computer-readable storage medium, which enables an electronic device to execute the pixel data determination method according to any one of the above items when a command in the computer-readable storage medium is executed by a processor of the electronic device.

Effect of the Invention

[0015] In an embodiment of the present invention, a pixel data collection command is sent to a line scan sensor, where the line scan sensor includes three photosensitive chips arranged in parallel. The three photosensitive chips respectively correspond to three colors. The pixel data collection command causes the pixel rows corresponding to the three photosensitive chips at different positions to be scanned respectively. The first photosensitive pixel data corresponding to the target pixel row transmitted from the line scan sensor is received. Then, until the second photosensitive pixel data and the third photosensitive pixel data corresponding to the target pixel row transmitted from the line scan sensor are received, a moving planned pixel row command and a pixel data collection command are cyclically and sequentially sent to the line scan sensor. Here, the first photosensitive pixel data is the photosensitive pixel data scanned by the first position photosensitive chip. When acquiring the first photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the first position photosensitive chip. The second photosensitive pixel data is the photosensitive pixel data scanned by the second position photosensitive chip. The third photosensitive pixel data is the photosensitive pixel data scanned by the third position photosensitive chip. When acquiring the second photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the second position photosensitive chip. When acquiring the third photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the third position photosensitive chip. Based on the color correction coefficient corresponding to the line scan sensor, the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row, the target pixel data corresponding to the target pixel row is determined. That is, the pixel data of the target pixel row is determined based on the scans of the first position photosensitive chip, the second position photosensitive chip, and the third position photosensitive chip respectively through multiple scans, and is obtained by scanning at the determined scanning positions. In the related art, when determining the target pixel data corresponding to the target pixel row, the pixel data of the target pixel row scans all the pixel data in one scan. After the color correction coefficient is corrected, there may be a problem of color edges. In contrast, by scanning at the determined scanning positions to obtain the corresponding pixel data, the area ranges of the determined pixel data are all normalized. Correspondingly, the determined pixel data is more accurate, that is, the problem of color edges does not occur, and further solves the problem that there are color edges in the target pixel data when determining the target pixel data corresponding to the target pixel row in the related art.

Brief Description of the Drawings

[0016] The drawings described herein are used to provide a further understanding of the present invention, form a part of this application, and the exemplary embodiments and descriptions of the present invention are used to explain the present invention and are not intended to unduly limit the present invention. In the drawings

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Modes for Carrying Out the Invention

[0017] For those skilled in the art to better understand the solution of the present invention, hereinafter, with reference to the drawings in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without creative labor should belong to the protection scope of the present invention.

[0018] Note that in the specification, claims, and the above drawings of the present invention, terms such as "first" and "second" are used to distinguish similar objects and do not necessarily need to be used to explain a specific order or sequence. Note that the data used in this way can be exchanged when appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. Also, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device comprising a series of steps or units is not limited to the explicitly listed steps or units, and may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.

[0019] (Example 1) According to an embodiment of the present invention, an embodiment of a pixel data determination method is provided. Note that the steps shown in the flowchart of the drawings can be executed in a computer system, for example, a set of computer-executable commands. Also, although the flowchart shows a logical order, in some cases, the steps shown or described in a different order can be executed.

[0020] FIG. 1 is a flowchart of a pixel data determination method according to an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps S102 to S108.

[0021] In step S102, a pixel data collection command is sent to the line scan sensor. Here, the line scan sensor includes three photosensitive chips arranged in parallel. The three photosensitive chips respectively correspond to three colors, and the pixel data collection command is used to scan the pixel rows corresponding to the three photosensitive chips at different positions.

[0022] In step S102 described in this application, by sending a pixel data acquisition command to the line scan sensor, the pixel data acquisition command can be used to scan pixel rows corresponding to three photosensitive chips at different positions. In a 3*3 image of pixels, assuming that the first-position photosensitive chip scans the pixel data of three pixel points in the first row, the second-position photosensitive chip scans the pixel data of three pixel points in the second row, and the third-position photosensitive chip scans the pixel data of three pixel points in the third row, it achieves that each photosensitive chip scans the pixel row at its corresponding position, making the data determined by the pixels in the pixel row more accurate.

[0023] As a preferred embodiment, the three photosensitive chips include a blue light photosensitive chip, a green light photosensitive chip, and a red light photosensitive chip. In this embodiment, the blue light photosensitive chip can acquire B pixel data, the green light photosensitive chip can acquire G pixel data, and the red light photosensitive chip can acquire R pixel data. That is, assuming that the blue light photosensitive chip, the green light photosensitive chip, and the red light photosensitive chip are at the first position, the second position, and the third position respectively as in the above example. The first-position photosensitive chip, that is, the blue photosensitive chip, scans the B pixel data of three pixel points in the first row, the second-position photosensitive chip, that is, the green photosensitive chip, scans the G pixel data of three pixel points in the second row, and the third-position photosensitive chip, that is, the red photosensitive chip, scans the R pixel data of three pixel points in the third row.

[0024] In step S104, receive the first photosensitive pixel data corresponding to the target pixel row transmitted from the line scan sensor. Here, the first photosensitive pixel data is the photosensitive pixel data scanned by the first-position photosensitive chip. When acquiring the first photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the first-position photosensitive chip.

[0025] In step S104 described in the present application, when acquiring the first photosensitive pixel data corresponding to the target pixel row, since the target pixel row corresponds to the scanning position of the first-position photosensitive chip, the obtained first photosensitive pixel data is from the position corresponding to the scanning position of the first-position photosensitive chip, and the first photosensitive pixel data can be accurately obtained by scanning.

[0026] In step S106, until receiving the second photosensitive pixel data and the third photosensitive pixel data corresponding to the target pixel row transmitted from the line scan sensor, the moving planned pixel row command and the pixel data collection command are sequentially and cyclically transmitted to the line scan sensor. Here, the second photosensitive pixel data is the photosensitive pixel data scanned by the second-position photosensitive chip, the third photosensitive pixel data is the photosensitive pixel data scanned by the third-position photosensitive chip. When acquiring the second photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the second-position photosensitive chip. When acquiring the third photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the third-position photosensitive chip.

[0027] In step S106 described in the present application, by this step, by moving the line scan sensor, all pixel data of the target pixel, that is, the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data can be acquired. The first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data are respectively scanned and obtained by the first-position photosensitive chip, the second-position photosensitive chip, and the third-position photosensitive chip at the directly corresponding positions.

[0028] In step S108, based on the color correction coefficient corresponding to the line scan sensor, the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row, the target pixel data corresponding to the target pixel row is determined.

[0029] In step S108 described in the present application, by this step, a color correction coefficient is obtained and involved in correction, pixel data is obtained using a method for obtaining pixel data in related art, and when correction is performed based on the color correction coefficient, a color edge phenomenon occurs. Therefore, this step can solve the problem that the color edge phenomenon occurs when the color correction coefficient is involved. Also, the pixel data can be corrected by the color correction coefficient, and the finally determined target pixel data can be restored to a more realistic color.

[0030] By the above steps, a pixel data collection command is sent to the line scan sensor, where the line scan sensor includes three photosensitive chips arranged in parallel. The three photosensitive chips respectively correspond to three colors. The pixel data collection command is used to scan pixel rows corresponding to the three photosensitive chips at different positions respectively. The first photosensitive pixel data corresponding to the target pixel row sent from the line scan sensor is received, and until the second photosensitive pixel data and the third photosensitive pixel data corresponding to the target pixel row sent from the line scan sensor are received, the moving planned pixel row command and the pixel data collection command are cyclically and sequentially sent to the line scan sensor. Here, the first photosensitive pixel data is the photosensitive pixel data scanned by the first position photosensitive chip. When acquiring the first photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the first position photosensitive chip. The second photosensitive pixel data is the photosensitive pixel data scanned by the second position photosensitive chip, and the third photosensitive pixel data is the photosensitive pixel data scanned by the third position photosensitive chip. When acquiring the second photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the second position photosensitive chip. When acquiring the third photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the third position photosensitive chip. Based on the color correction coefficient corresponding to the line scan sensor, the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row, the target pixel data corresponding to the target pixel row is determined. That is, the pixel data of the target pixel row is determined based on the scans of the first position photosensitive chip, the second position photosensitive chip, and the third position photosensitive chip respectively through multiple scans, and is obtained by scanning at the determined scanning positions. In the related art, when the pixel data of the target pixel row is determined, all pixel data is scanned by one scan, and after the color correction coefficient is corrected, there may be a problem of color edges. In contrast, by scanning at the determined scanning positions to obtain the corresponding pixel data, the area ranges of the determined pixel data are all normalized. Correspondingly, the determined pixel data is more accurate, that is, the problem of color edges does not occur, and further solves the problem that there are color edges in the target pixel data when determining the target pixel data corresponding to the target pixel row in the related art.

[0031] As a preferred embodiment, before the step of sending a pixel data collection command to the line scan sensor, further included are a step of obtaining a scanning area in which the line scan sensor scans the object to be scanned, a step of determining an initial scanning position of the scanning sensor based on the scanning area, and a step of sending a position adjustment command to the line scan sensor, wherein the initial scanning position is attached to the position adjustment command.

[0032] In this embodiment, when the line scan sensor scans the object to be scanned, a scanning area including this object to be scanned can be determined. Based on this scanning area, the initial scanning position of the scan sensor is determined, and by sending a position adjustment command to the line scan sensor, the line scan sensor will reach the initial scanning position in response to the position adjustment command, thereby completing the image processing of the entire scanning area.

[0033] As a preferred embodiment, after the step of determining the target pixel data corresponding to the target pixel row based on the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row, further included are a step of determining an end scanning position of the scanning sensor based on the scanning area, a step of determining all pixel rows passed from the initial scanning position to the end scanning position, a step of cyclically and sequentially sending a moving planned pixel row command and a pixel data collection command to the line scan sensor until receiving the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data respectively corresponding to all pixel rows sent from the line scan sensor, and a step of determining image data corresponding to the scanning area based on the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data respectively corresponding to all pixel rows.

[0034] In this embodiment, pixel data of all pixel rows in the scanning area is acquired to determine image data corresponding to the scanning area. As can be understood, moving the line scan sensor is equivalent to moving the positions of the three photosensitive chips, and the three photosensitive chips are controlled to scan the corresponding three rows of pixels respectively to obtain corresponding pixel values. When receiving the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to all the pixel rows transmitted from the line scan sensor respectively, the final image data can be determined, so that there is no problem of color edges in the finally determined image.

[0035] As a preferred embodiment, before the step of transmitting a pixel data collection command to the line scan sensor, the method further includes a step of determining a moving pixel row, and a step of determining a pixel data collection command and a planned moving pixel row command based on the moving pixel row.

[0036] In this embodiment, the number of pixel rows collected by the pixel data collection command and the number of pixel rows moved by the planned moving pixel row can both be determined according to actual applications and scenes. That is, when determining how many pixel rows are desired, based on the moving pixel row, a pixel data collection command and a planned moving pixel row command can be determined. For example, when the target moves by the length of one pixel, the moving pixel row is 1, the number of pixel rows collected by the pixel data collection command is 1, and the number of pixel rows moved by the planned moving pixel row is 1. That is, the pixel row scanned by the photosensitive chip is 1 row, and the planned moving pixel row is 1 row. When the target moves by the length of two pixels, the moving pixel row is 2, the number of pixel rows collected by the pixel data collection command is 2, and the number of pixel rows moved by the planned moving pixel row is 1. That is, the pixel row scanned by the photosensitive chip is 2 rows, and the planned moving pixel row is 1 row. By making different settings, the requirements of different applications and scenes can be met, and the protection scope of the present application can be expanded.

[0037] As a preferred embodiment, the step of determining the target movement distance includes the step of obtaining the target resolution and the step of determining the target movement pixel row based on the target resolution.

[0038] In this embodiment, a method for determining the target movement distance is disclosed. For example, when a resolution pixel with a halved high resolution is used, for example, when 600 DPI (Dots Per Inch, the number of dots per inch) is used as a resolution of 300 DPI, the movement length changes from the original 43.2 um (the same as the length of one pixel above) to 84.6 um (the same as the length of two pixels above). That is, the movement pixel row changes from 1 to 2. At this time, if the number of pixel rows collected by the pixel data collection command changes from 1 to 2, the collection of pixels can be completed. The method provided in the present application can be adjusted according to different resolutions, increasing the applicability of this solution means.

[0039] As a preferred embodiment, before the step of determining the target pixel data corresponding to the target pixel row based on the color correction coefficient corresponding to the line scan sensor, the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row, it includes the step of obtaining the color correction coefficient corresponding to the line scan sensor.

[0040] In this embodiment, by obtaining the color correction coefficient, the problem of the occurrence of the color edge phenomenon when the color correction coefficient is involved can be solved. Also, the pixel data can be corrected by the color correction coefficient, and the finally determined target pixel data can be restored to a more realistic color.

[0041] Based on the above embodiments and preferred embodiments, a preferred embodiment is provided and will be specifically described below.

[0042] In a preferred embodiment of the present invention, a method for determining pixel data is provided. The line scan sensor is a line scan sensor in which three columns of photosensitive chips, namely blue, green, and red, are arranged in parallel. That is, taking the example where the blue photosensitive chip is at the first position, the green photosensitive chip is at the second position, and the red photosensitive chip is at the third position, the three columns of photosensitive chips of the line scan sensor for blue, green, and red are B, G, and R respectively. The three rows of pixel data obtained in one exposure are respectively the pixel data of the blue light for the row corresponding to the first position, the pixel data of the green light for the row corresponding to the second position, and the pixel data of the red light for the row corresponding to the third position. By the method provided in the preferred embodiment of the present invention, the pixel information of the pixel points can be accurately determined, and the color edge phenomenon existing between the pixel rows can be eliminated.

[0043] FIG. 2 is a schematic diagram of pixel points in the prior art, and each pixel point is composed of three color apertures of red, green, and blue. The method for determining pixel data provided in the preferred embodiment of the present invention performs exposure in three steps (the same as the above scanning) to obtain all the pixel data of the pixel points in one row in FIG. 2.

[0044] In the prior art, a color edge phenomenon occurs in the image formed after directly multiplying (B1, G1, R1) by the color correction coefficient. FIG. 3 is a schematic diagram of the image after using the method provided in the preferred embodiment of the present invention. As shown in FIG. 3, after adopting this technology, after multiplying (B1, G2, R3) by the color correction coefficient, an image is formed, and in the scanning process, the color edge phenomenon disappears. Hereinafter, the preferred embodiment of the present invention will be described in detail.

[0045] In S1, obtain the scanning area where the line scan sensor scans the object to be scanned. In S2, based on the scanning area, determine the initial scanning position of the scanning sensor. In S3, send a position adjustment command to the line scan sensor to move the line scan sensor to the initial scanning position, that is, enable the blue light photosensitive chip to scan the pixel points in the first row. In S4, a pixel data collection command is sent to the line scan sensor to cause the line scan sensor to perform exposure scanning, obtaining the pixel data of the first line, defined as B1. That is, at this time, it is the B1 pixel data of the pixel points in the first line. Since the blue photosensitive chip is at the first position and can only scan the pixel points in the first line, the green photosensitive chip and the red photosensitive chip behind the blue photosensitive chip cannot obtain the pixel data of the pixel points. In S5, a planned pixel row movement command and a pixel data collection command are sent to the line scan sensor to move the line scan sensor one line in a predetermined direction, cause the line scan sensor to perform exposure scanning, and obtain the pixel data G2 of the first line and the pixel data B2 of the second line. In S6, again, a planned pixel row movement command and a pixel data collection command are sent to the line scan sensor to further move the line scan sensor one line in a predetermined direction, cause the line scan sensor to perform exposure scanning, and obtain the pixel data R3 of the first line, the pixel data G3 of the second line, and the pixel data B3 of the third line. Note that FIG. 4 is a schematic diagram of pixel data determination in a preferred embodiment of the present invention. As shown in FIG. 4, the determination process of the (B1, G2, R3) pixel data of the pixel points in the first line described above is shown in FIG. 4. The dark-colored part in the figure is the (B1, G2, R3) pixel data. ··· In S7, when receiving the pixel data B, pixel data G, and pixel data R corresponding to all the pixel rows transmitted from the line scan sensor respectively, In S8, based on the color correction coefficient, the pixel data B, pixel data G, and pixel data R corresponding to all the pixel rows, the image data corresponding to the scanning region is determined.

[0046] In the above process, determining the image data corresponding to the scanning area may be to determine the target pixel data corresponding to each pixel row based on the color correction coefficient, the pixel data B, pixel data G, and pixel data R corresponding to each pixel row. For example, for a certain pixel point in the first row, the pixel data of the pixel point in the first row is (B1, G2, R3), and after multiplying by the color correction coefficient, a color-corrected color pixel point is obtained. In this way, the pixel points obtained in the Nth, N+1th, and N+2th exposures are also color-corrected using the same algorithm.

[0047] Preferably, based on the above preferred embodiment, the present application further proposes an expansion means for converting a high resolution into a low resolution for use. FIG. 5 is a schematic diagram of pixel data determination in the expansion means of the preferred embodiment of the present invention. As shown in FIG. 5, FIG. 5 shows the determination process of the following (B1, G1, R2) pixel data. The dark-colored part in the figure is the above (B1, G1, R2) pixel data. Hereinafter, the solution means will be specifically described.

[0048] Since the high resolution is converted into a low resolution for use, two pixel points in the case of the original high resolution are four pixel points: B1 in the first row of pixel 1, B1 in the first row of pixel 2, G in the upper row of pixel 1, and G in the upper row of pixel 2, which constitute one new low-resolution pixel point. Assuming that scanning starts from the middle position of the scanning area, when the scanning direction moves from B to R at the pixel point, a line scan camera with three columns of photosensitive chips arranged in sequence of blue, green, and red can expose in two steps to obtain image data of three colors. Define the image data of the red light obtained in the first exposure as R1 and the image data of the blue light as B1. When moving to 1 / 2 line, start the second exposure to obtain the image data G1 of the green light. When moving to 1 line, expose to obtain the pixel data R2 and B2, and (B1, G1, R2) × color correction coefficient = a color point synthesized from the gradation values of the three colors of red, green, and blue R, G, B is used as the color pixel point in the first row. In this way, the pixel points obtained in the Nth, N+1th, and N+2th exposures are also color-corrected using the same algorithm.

[0049] According to the above preferred embodiments, at least the following beneficial effects can be achieved. The pixel data of the target pixel row is determined by scanning photosensitive chips at different positions through multiple scans, and is obtained by scanning at the determined scanning positions. In the related art, the pixel data of the target pixel row is obtained by one scan, and all pixel data is scanned, and there may be a problem of color edges. In contrast, by scanning at the determined scanning positions to obtain the corresponding pixel data, the area ranges of the determined pixel data are all standardized. Correspondingly, the determined pixel data is more accurate, that is, the problem of color edges does not occur, and further solves the problem that there are color edges in the target pixel data when determining the target pixel data corresponding to the target pixel row in the related art.

[0050] In addition, for the embodiments of each method described above, for the sake of simplicity of explanation, it is expressed as a combination of a series of operations. However, as those skilled in the art will understand, the present invention is not limited to the described operation sequence. According to the present invention, some steps can adopt other sequences or be performed simultaneously. Next, as those skilled in the art will understand, all the embodiments described in the specification belong to preferred embodiments, and such operations and modules are not necessarily essential to the present invention.

[0051] From the description of the above embodiments, those skilled in the art will understand that the method according to the above embodiments may be implemented in a form adding a general-purpose hardware platform required for software. Of course, it may also be implemented by hardware. However, it is obvious that in many cases the former is a more preferred embodiment. Based on such an understanding, the technical solution of the present invention can be embodied in the form of a software product in essence or in the part contributing to the prior art. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several commands for causing a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the embodiments of the present invention.

[0052] (Example 2) According to an embodiment of the present invention, there is further provided an apparatus configured to implement the above pixel data determination method. FIG. 6 is a block diagram of the structure of a pixel data determination apparatus according to an embodiment of the present invention. As shown in FIG. 6, the apparatus includes a transmission module 602, a reception module 604, a transmission / reception module 606, and a determination module 608. Hereinafter, the apparatus will be described in detail.

[0053] The transmission module 602 is provided to transmit a pixel data collection command to the line scan sensor. Here, the line scan sensor includes three photosensitive chips arranged in parallel. The three photosensitive chips respectively correspond to three colors. The pixel data collection command is used to scan the pixel rows corresponding to the three photosensitive chips at different positions respectively. The reception module 604 is connected to the above-mentioned transmission module 602 and is provided to receive the first photosensitive pixel data corresponding to the target pixel row transmitted from the line scan sensor. Here, the first photosensitive pixel data is the photosensitive pixel data scanned by the first-position photosensitive chip. When acquiring the first photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the first-position photosensitive chip. The transceiver module 606 is connected to the above-mentioned reception module 604 and is provided to cyclically and sequentially transmit a moving planned pixel row command and a pixel data collection command to the line scan sensor until the second photosensitive pixel data and the third photosensitive pixel data corresponding to the target pixel row transmitted from the line scan sensor are received. Here, the second photosensitive pixel data is the photosensitive pixel data scanned by the second-position photosensitive chip, and the third photosensitive pixel data is the photosensitive pixel data scanned by the third-position photosensitive chip. When acquiring the second photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the second-position photosensitive chip. When acquiring the third photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the third-position photosensitive chip. The determination module 608 is connected to the above-mentioned transceiver module 606 and is provided to determine the target pixel data corresponding to the target pixel row based on the color correction coefficient corresponding to the line scan sensor, the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row.

[0054] It should be noted that the above-mentioned transmission module 602, reception module 604, transceiver module 606, and determination module 608 correspond to the implementation of steps S102 to S108 in the pixel data determination method. The examples and application scenarios realized by the corresponding steps of the plurality of modules are similar, but are not limited to the content disclosed in the above-mentioned Example 1.

[0055] (Example 3) According to another aspect of the embodiments of the present invention, there is provided an electronic device including a processor and a memory provided to store commands executable by the processor, wherein the processor is configured to execute commands so as to implement the pixel data determination method according to any one of the above items. Further provided is an electronic device.

[0056] (Example 4) According to another aspect of the embodiments of the present invention, there is provided a computer-readable storage medium, wherein when commands in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute the pixel data determination method according to any one of the above items. Further provided is a computer-readable storage medium.

[0057] The order of the above embodiments of the present invention is only used for explanation and does not represent the superiority or inferiority of the embodiments.

[0058] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0059] In some embodiments provided by the present application, naturally, the disclosed technical content can be realized in other forms. Here, the embodiments of the device described above are merely exemplary. For example, the division of the above units may be a logical function division, and in actual implementation, other division methods may also be used. For example, a plurality of units or modules may be combined or integrated into other systems, or some features may be ignored or not executed. Also, the couplings or direct couplings or communicable connections shown or discussed may be indirect couplings or communicable connections through some interface, unit or module, and may be electrical or other forms.

[0060] The unit described as a separation member may or may not be physically separated, and the member displayed as a unit may or may not be a physical unit, that is, it may be located in a single place or distributed among multiple units. Depending on the actual needs, some or all of these units can be selected to achieve the purpose of the solution means of this embodiment.

[0061] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may physically exist alone, or two or more units may be integrated into one unit. The above integrated unit may be realized in the form of hardware or in the form of a software functional unit.

[0062] When the above integrated unit is realized in the form of a software functional unit and is sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical means of the present invention may essentially or the part that contributes to the prior art or all or part of the technical means may be represented in the form of a software product. The computer-readable storage medium software product is stored in a storage medium and contains several commands used to cause a computer-readable storage medium device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The above-mentioned storage medium includes various media capable of storing program codes such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a portable hard disk, a magnetic disk, or an optical disk.

[0063] The above description is only a preferred embodiment of the present invention. Of course, those skilled in the art can make some improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be regarded as within the protection scope of the present invention.

Industrial Applicability

[0064] The solution provided by the embodiments of the present application can be applied in the field of image processing. In the embodiments of the present application, a pixel data collection command is sent to a line scan sensor, where the line scan sensor includes three photosensitive chips arranged in parallel. The three photosensitive chips respectively correspond to three colors. The pixel data collection command is used to scan the pixel rows corresponding to the three photosensitive chips at different positions respectively. The first photosensitive pixel data corresponding to the target pixel row sent from the line scan sensor is received, and the moving planned pixel row command and the pixel data collection command are cyclically and sequentially sent to the line scan sensor until the second photosensitive pixel data and the third photosensitive pixel data corresponding to the target pixel row sent from the line scan sensor are received. Here, the first photosensitive pixel data is the photosensitive pixel data scanned by the first position photosensitive chip. When the first photosensitive pixel data corresponding to the target pixel row is obtained, the target pixel row corresponds to the scanning position of the first position photosensitive chip. The second photosensitive pixel data is the photosensitive pixel data scanned by the second position photosensitive chip, and the third photosensitive pixel data is the photosensitive pixel data scanned by the third position photosensitive chip. When the second photosensitive pixel data corresponding to the target pixel row is obtained, the target pixel row corresponds to the scanning position of the second position photosensitive chip. When the third photosensitive pixel data corresponding to the target pixel row is obtained, the target pixel row corresponds to the scanning position of the third position photosensitive chip. Based on the color correction coefficient corresponding to the line scan sensor, the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row, the target pixel data corresponding to the target pixel row is determined. That is, the pixel data of the target pixel row is determined based on the scans of the first position photosensitive chip, the second position photosensitive chip, and the third position photosensitive chip respectively through multiple scans, and is obtained by scanning at the determined scanning positions. In the related art, the pixel data of the target pixel row scans all the pixel data through one scan, and there may be a problem of color edges after the color correction coefficient is corrected.On the contrary, by scanning at the determined scanning position to obtain the corresponding pixel data, the area ranges of the determined pixel data are all normalized, and correspondingly, the determined pixel data is more accurate, that is, the problem of color edges does not occur, and when determining the target pixel data corresponding to the target pixel row in the related art, the problem that color edges exist in the target pixel data is further solved.

Claims

1. A step of sending a pixel data collection command to a line scan sensor, wherein the line scan sensor includes three photosensitive chips arranged in parallel, the three photosensitive chips respectively correspond to three colors, and the pixel data collection command is used to scan pixel rows corresponding to the three photosensitive chips at different positions respectively; A step of receiving first photosensitive pixel data corresponding to a target pixel row transmitted from the line scan sensor, wherein the first photosensitive pixel data is photosensitive pixel data scanned by a first-position photosensitive chip, and when acquiring the first photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the first-position photosensitive chip; A step of cyclically and sequentially sending a moving planned pixel row command and the pixel data collection command to the line scan sensor until second photosensitive pixel data and third photosensitive pixel data corresponding to the target pixel row transmitted from the line scan sensor are received, wherein the second photosensitive pixel data is photosensitive pixel data scanned by a second-position photosensitive chip, the third photosensitive pixel data is photosensitive pixel data scanned by a third-position photosensitive chip, when acquiring the second photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the second-position photosensitive chip, and when acquiring the third photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the third-position photosensitive chip; A step of determining the target pixel data corresponding to the target pixel row based on a color correction coefficient corresponding to the line scan sensor, the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row. A pixel data determination method comprising the above steps.

2. Before the step of sending a pixel data collection command to a line scan sensor, further comprising: A step of acquiring a scanning area where the line scan sensor scans an object to be scanned; A step of determining an initial scanning position of the scanning sensor based on the scanning area; A step of sending a position adjustment command to the line scan sensor, wherein the initial scanning position is attached to the position adjustment command. The method according to Claim 1 comprising the above steps.

3. After the step of determining target pixel data corresponding to the target pixel row based on the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row, further determining an end scanning position of the scanning sensor based on the scanning region; determining all pixel rows passing from the initial scanning position to the end scanning position; cyclically and sequentially transmitting the planned moving pixel row command and the pixel data collection command to the line scan sensor until receiving the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data respectively corresponding to all the pixel rows transmitted from the line scan sensor; determining image data corresponding to the scanning region based on the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data respectively corresponding to all the pixel rows, the method according to claim 2.

4. Before the step of transmitting the pixel data collection command to the line scan sensor, further determining a moving pixel row; determining the pixel data collection command and the planned moving pixel row command based on the moving pixel row, the method according to claim 1.

5. The step of determining a moving pixel row includes obtaining a target resolution; determining the target moving pixel row based on the target resolution, the method according to claim 4.

6. Before the step of determining the target pixel data corresponding to the target pixel row based on the color correction coefficient corresponding to the line scan sensor, the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row, includes obtaining the color correction coefficient corresponding to the line scan sensor, the method according to claim 1.

7. The method according to any one of claims 1 to 6, wherein the three photosensitive chips include a blue light photosensitive chip, a green light photosensitive chip, and a red light photosensitive chip.

8. A transmission module provided to send a pixel data collection command to a line scan sensor, wherein the line scan sensor includes three photosensitive chips arranged in parallel, the three photosensitive chips respectively correspond to three colors, and the pixel data collection command is used to respectively scan pixel rows corresponding to the three photosensitive chips at different positions. A receiving module provided to receive first photosensitive pixel data corresponding to a target pixel row transmitted from the line scan sensor, wherein the first photosensitive pixel data is photosensitive pixel data scanned by a first-position photosensitive chip, and when acquiring the first photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the first-position photosensitive chip. A transceiver module provided to cyclically and sequentially send a moving planned pixel row command and the pixel data collection command to the line scan sensor until receiving second photosensitive pixel data and third photosensitive pixel data corresponding to the target pixel row transmitted from the line scan sensor, wherein the second photosensitive pixel data is photosensitive pixel data scanned by a second-position photosensitive chip, the third photosensitive pixel data is photosensitive pixel data scanned by a third-position photosensitive chip, when acquiring the second photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the second-position photosensitive chip, and when acquiring the third photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the third-position photosensitive chip. A pixel data determination device including a determination module provided to determine the target pixel data corresponding to the target pixel row based on a color correction coefficient corresponding to the line scan sensor, the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data corresponding to the target pixel row.

9. A processor; A memory provided to store commands executable by the processor, and wherein the processor is configured to execute the commands so as to implement the pixel data determination method according to any one of Claims 1 to 7. An electronic device.

10. A computer-readable storage medium, wherein when a command in the computer-readable storage medium is executed by a processor of an electronic device, the electronic device can execute the pixel data determination method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Original scanner

    JP1987117462A

  • Image reading device with relatively dislocated reading timing

    JP1989019864A

  • Color picture reader

    JP1990203676A

  • Magnetic head

    JP1994020221A