WO2024109028A1 - 像素数据确定方法、装置及电子设备 - Google Patents

像素数据确定方法、装置及电子设备 Download PDF

Info

Publication number
WO2024109028A1
WO2024109028A1 PCT/CN2023/102899 CN2023102899W WO2024109028A1 WO 2024109028 A1 WO2024109028 A1 WO 2024109028A1 CN 2023102899 W CN2023102899 W CN 2023102899W WO 2024109028 A1 WO2024109028 A1 WO 2024109028A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel data
photosensitive
row
target
line scan
Prior art date
Application number
PCT/CN2023/102899
Other languages
English (en)
French (fr)
Inventor
戴朋飞
姜利
徐家齐
Original Assignee
威海华菱光电股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 威海华菱光电股份有限公司 filed Critical 威海华菱光电股份有限公司
Publication of WO2024109028A1 publication Critical patent/WO2024109028A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/10Circuitry of solid-state image sensors [SSIS]; Control thereof for transforming different wavelengths into image signals
    • H04N25/11Arrangement of colour filter arrays [CFA]; Filter mosaics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/60Noise processing, e.g. detecting, correcting, reducing or removing noise
    • H04N25/61Noise processing, e.g. detecting, correcting, reducing or removing noise the noise originating only from the lens unit, e.g. flare, shading, vignetting or "cos4"
    • H04N25/611Correction of chromatic aberration

Definitions

  • the present invention relates to the field of image processing, and in particular to a method, device and electronic device for determining pixel data.
  • the line array sensor is a linear scan, with the advantages of wide format, compact structure, space saving, 1:1 image, no distortion, etc.
  • This line array camera is a line scan camera composed of three rows of red, green and blue color chips. Each pixel is composed of three kinds of pixel data: red, green and blue.
  • red, green and blue During the scanning process, a single pixel is exposed multiple times, and it is composed of red, green and blue three-color photosensitive chips, which can complete the formation of a color image with only one white light.
  • using this method to determine the color image is likely to cause the determined image to have color edges, which interferes with the judgment and recognition of the final image.
  • the embodiments of the present invention provide a method, device and electronic device for determining pixel data, so as to at least solve the technical problem that when determining target pixel data corresponding to a target pixel row in the related art, the target pixel data may have color edges.
  • a method for determining pixel data comprising: sending a pixel data acquisition instruction to a line scan sensor, wherein the line scan sensor includes three photosensitive chips arranged in parallel, and the three photosensitive chips correspond to three colors respectively, and the pixel data acquisition instruction is used to make the three photosensitive chips located at different positions scan corresponding pixel rows respectively; receiving first photosensitive pixel data corresponding to a target pixel row sent by the line scan sensor, wherein the first photosensitive pixel data is photosensitive pixel data scanned by the photosensitive chip at the first position, and when acquiring the first photosensitive pixel data corresponding to the target pixel row, the target The pixel row corresponds to the scanning position of the photosensitive chip at the first position; the instruction to move the predetermined pixel row and the pixel data acquisition instruction are sent to the line scan sensor in a cyclical manner until the second photosensitive pixel data and the third photosensitive pixel data corresponding to the target pixel row sent by the line scan sensor are received, where
  • the target pixel row When acquiring the second photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the photosensitive chip at the second position, 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 photosensitive chip at the third position; according to 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.
  • the pixel data acquisition instruction before sending the pixel data acquisition instruction to the line scan sensor, it also includes: acquiring a scanning area of the line scan sensor scanning the scanned object; determining an initial scanning position of the scanning sensor based on the scanning area; and sending a position adjustment instruction to the line scan sensor, wherein the position adjustment instruction carries the initial scanning position.
  • the method further includes: determining the end scanning position of the scanning sensor based on the scanning area; determining all pixel rows passed from the initial scanning position to the end scanning position; cyclically sending the instruction to move the predetermined pixel row and the pixel data acquisition instruction to the line scan sensor in sequence until the first photosensitive pixel data, the second photosensitive pixel data and the third photosensitive pixel data corresponding to all the pixel rows are received from the line scan sensor; determining the 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 corresponding to all the pixel rows.
  • the pixel data acquisition instruction before sending the pixel data acquisition instruction to the line scan sensor, it also includes: determining a moving pixel row; and determining the pixel data acquisition instruction and the moving predetermined pixel row instruction based on the moving pixel row.
  • determining the moving pixel row includes: acquiring a target resolution; and determining the target moving pixel row according to the target resolution.
  • the second photosensitive pixel data and the third photosensitive pixel data corresponding to the target pixel row includes: acquiring the color correction coefficient corresponding to the line scan sensor.
  • the three photosensitive chips include: a blue light photosensitive chip, a green light photosensitive chip, and a red light photosensitive chip.
  • a pixel data determination device comprising: a sending module, configured to send a pixel data acquisition instruction to a line scan sensor, wherein the line scan sensor includes three photosensitive chips, and the three photosensitive chips are respectively located at different positions, and the pixel data acquisition instruction is used to make the three photosensitive chips located at different positions scan corresponding pixel rows respectively; a receiving module, configured to receive first photosensitive pixel data corresponding to a target pixel row sent by the line scan sensor, wherein the first photosensitive pixel data is photosensitive pixel data scanned by the photosensitive chip at a first position, 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 photosensitive chip at the first position; a transceiver module A block is configured to cyclically send instructions for moving a predetermined pixel row and the pixel data acquisition instructions to the line scan sensor in sequence until second photosensitive pixel data and third photosensitive pixel data corresponding
  • an electronic device comprising: a processor; and a memory configured to store instructions executable by the processor; wherein the processor is configured to execute the instructions to implement a pixel data determination method as described in any one of the above.
  • a computer-readable storage medium When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any of the pixel data determination methods described above.
  • a pixel data acquisition instruction is sent to a line scan sensor, wherein the line scan sensor includes three photosensitive chips arranged in parallel, the three photosensitive chips correspond to three colors respectively, and the pixel data acquisition instruction is used to enable the three photosensitive chips located at different positions to scan the corresponding pixel rows respectively, receive the first photosensitive pixel data corresponding to the target pixel row sent by the line scan sensor, and then cyclically send the moving predetermined pixel row instruction and the pixel data acquisition instruction to the line scan sensor in sequence until the second photosensitive pixel data and the third photosensitive pixel data corresponding to the target pixel row sent by the line scan sensor are received, wherein the first photosensitive pixel The data is the photosensitive pixel data scanned by the photosensitive chip at the first position.
  • the target pixel row When acquiring the first photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the photosensitive chip at the first position.
  • the second photosensitive pixel data is the photosensitive pixel data scanned by the photosensitive chip at the second position.
  • the third photosensitive pixel data is the photosensitive pixel data scanned by the photosensitive chip at the third position.
  • the target pixel row When acquiring the second photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the photosensitive chip at the second position.
  • the target pixel row When acquiring the third photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the photosensitive chip at the third position.
  • the target pixel data corresponding to the target pixel row is determined 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. That is, the pixel data of the target pixel row is scanned multiple times, respectively determined by scanning the first position photosensitive chip, the second position photosensitive chip and the third position photosensitive chip, and is obtained by scanning at a determined scanning position. Compared with the related art, the pixel data of the target pixel row is scanned once to scan all the pixel data. After the color correction coefficient is corrected, there may be a color edge problem.
  • the Scanning at a determined scanning position to obtain the corresponding pixel data makes the area range of the determined pixel data standardized.
  • the determined pixel data is more accurate, that is, there will be no color edge problem, thereby solving the related art.
  • the target pixel data corresponding to the target pixel row is determined during the operation, the target pixel data may have a technical problem of color edge.
  • FIG. 1 is a flow chart of a method for determining pixel data according to an embodiment of the present invention
  • FIG2 is a schematic diagram of a pixel in the prior art
  • FIG3 is a schematic diagram of an image after using the method provided in an optional embodiment of the present invention.
  • FIG4 is a schematic diagram of determining pixel data in an optional embodiment of the present invention.
  • FIG5 is a schematic diagram of determining pixel data in an extended solution of an optional implementation manner of the present invention.
  • FIG. 6 is a structural block diagram of a device for determining pixel data according to an embodiment of the present invention.
  • an embodiment of a method for determining pixel data is provided. It should be noted that, in the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be performed in an order different from that herein.
  • FIG. 1 is a flow chart of a method for determining pixel data according to an embodiment of the present invention. As shown in FIG. 1 , the method comprises the following steps:
  • Step S102 sending a pixel data acquisition instruction to the line scan sensor, wherein the line scan sensor includes three photosensitive chips arranged in parallel, the three photosensitive chips correspond to three colors respectively, and the pixel data acquisition instruction is used to make the three photosensitive chips located at different positions scan the corresponding pixel rows respectively;
  • step S102 described in the present application by sending a pixel data acquisition instruction to the line scan sensor, the pixel data acquisition instruction can be used to enable three photosensitive chips located at different positions to scan corresponding pixel rows respectively.
  • the photosensitive chip at the first position scans the pixel data of 3 pixels in the first row
  • the photosensitive chip at the second position scans the pixel data of 3 pixels in the second row
  • the photosensitive chip at the third position scans the pixel data of 3 pixels in the third row, so that each photosensitive chip scans the pixel row at the position corresponding to it, so that the data determined by the pixels in the pixel row is more accurate.
  • three photosensitive chips include: a blue light photosensitive chip, a green light photosensitive chip, and a red light photosensitive chip.
  • the blue light photosensitive chip can obtain B pixel data
  • the green light photosensitive chip can obtain G pixel data
  • the red light photosensitive chip can obtain R pixel data, that is, as in the above example, it is assumed that the blue light photosensitive chip, the green light photosensitive chip, and the red light photosensitive chip are respectively located at the first position, the second position, and the third position.
  • the photosensitive chip at the first position that is, the blue photosensitive chip, scans the B pixel data of the three pixels in the first row
  • the photosensitive chip at the second position that is, the green photosensitive chip, scans the G pixel data of the three pixels in the second row
  • the photosensitive chip at the third position that is, the red photosensitive chip, scans the R pixel data of the three pixels in the third row.
  • Step S104 receiving first photosensitive pixel data corresponding to the target pixel row sent by the line scan sensor, wherein the first photosensitive pixel data is photosensitive pixel data scanned by the photosensitive chip at the first position, 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 photosensitive chip at the first position;
  • step S104 described in the present application 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, so that the obtained first photosensitive pixel data is at a position corresponding to the scanning position of the first-position photosensitive chip, and the first photosensitive pixel data can be accurately scanned and obtained.
  • Step S106 cyclically sending the instruction to move the predetermined pixel row and the pixel data acquisition instruction to the line scan sensor in sequence until the second photosensitive pixel data and the third photosensitive pixel data corresponding to the target pixel row sent by the line scan sensor are received, wherein the second photosensitive pixel data is the photosensitive pixel data scanned by the photosensitive chip at the second position, and the third photosensitive pixel data is the photosensitive pixel data scanned by the photosensitive chip at the third position.
  • the target pixel row corresponds to the scanning position of the photosensitive chip at the second position
  • the target pixel row corresponds to the scanning position of the photosensitive chip at the third position
  • step S106 recorded in the present application through this step, all pixel data of the target pixel row, that is, the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data can be acquired by moving the line scan sensor, so that the first photosensitive pixel data, the second photosensitive pixel data, and the third photosensitive pixel data are all scanned by the first position photosensitive chip, the second position photosensitive chip, and the third position photosensitive chip which are in the corresponding positions, respectively.
  • step S108 target pixel data corresponding to the target pixel row is determined according to the color correction coefficient corresponding to the line scan sensor and the first photosensitive pixel data, the second photosensitive pixel data and the third photosensitive pixel data corresponding to the target pixel row.
  • step S108 described in the present application through this step, the color correction coefficient is obtained to participate in the correction.
  • the pixel data is obtained by using the method of obtaining pixel data in the related art and the correction is performed according to the color correction coefficient, the color edge phenomenon will appear. Therefore, through this step, the problem of the color edge phenomenon occurring with the participation of the color correction coefficient can be eliminated. Moreover, through the color correction coefficient, the pixel data can be corrected so that the target pixel data finally determined can restore a more realistic color.
  • a pixel data acquisition instruction is sent to the line scan sensor, wherein the line scan sensor includes three photosensitive chips arranged in parallel, the three photosensitive chips correspond to three colors respectively, and the pixel data acquisition instruction is used to enable the three photosensitive chips located at different positions to scan the corresponding pixel rows respectively, receive the first photosensitive pixel data corresponding to the target pixel row sent by the line scan sensor, and then cyclically send the moving predetermined pixel row instruction and the pixel data acquisition instruction to the line scan sensor in sequence until the second photosensitive pixel data and the third photosensitive pixel data corresponding to the target pixel row sent by the line scan sensor are received, wherein the first photosensitive pixel data
  • the first photosensitive pixel data is the photosensitive pixel data scanned by the photosensitive chip at the first position.
  • the target pixel row When acquiring the first photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the photosensitive chip at the first position.
  • the second photosensitive pixel data is the photosensitive pixel data scanned by the photosensitive chip at the second position.
  • the third photosensitive pixel data is the photosensitive pixel data scanned by the photosensitive chip at the third position.
  • the target pixel row When acquiring the second photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the photosensitive chip at the second position.
  • the target pixel row When acquiring the third photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the photosensitive chip at the third position.
  • the target pixel data corresponding to the target pixel row is determined 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. That is, the pixel data of the target pixel row is scanned multiple times, respectively, based on the first position photosensitive chip, the second position photosensitive chip and the third position photosensitive chip, and is obtained by scanning at a determined scanning position. Compared with the related art, the pixel data of the target pixel row is scanned once to scan all the pixel data. After the color correction coefficient is corrected, there may be color edge problems. The corresponding pixel data is obtained by scanning, so that the area range of the determined pixel data is standardized. Correspondingly, the determined pixel data is more accurate, that is, there will be no color edge problem, thereby solving the technical problem that when the target pixel data corresponding to the target pixel row is determined in the related technology, the target pixel data will have color edges.
  • a pixel data acquisition instruction before sending a pixel data acquisition instruction to the line scan sensor, it also includes: acquiring a scanning area of the line scan sensor scanning the scanned object; determining an initial scanning position of the scanning sensor based on the scanning area; and sending a position adjustment instruction to the line scan sensor, wherein the position adjustment instruction carries the initial scanning position.
  • the line scan sensor when the line scan sensor is to scan an object to be scanned, it is possible to determine a scanning area including the object to be scanned. Based on the scanning area, the initial scanning position of the scanning sensor is determined, and a position adjustment instruction is sent to the line scan sensor, so that the line scan sensor reaches the initial scanning position in response to the position adjustment instruction, so as to complete the image processing of the entire scanning area.
  • the second photosensitive pixel data and the third photosensitive pixel data corresponding to the target pixel row it also includes: determining the end scanning position of the scanning sensor based on the scanning area; determining all pixel rows passed from the initial scanning position to the end scanning position; cyclically sending instructions for moving predetermined pixel rows and pixel data acquisition instructions to the line scan sensor in sequence until the first photosensitive pixel data, the second photosensitive pixel data and the third photosensitive pixel data corresponding to all pixel rows are received from the line scan sensor; and determining the 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 corresponding to all pixel rows.
  • pixel data of all pixel rows in the scanning area are obtained to determine the image data corresponding to the scanning area.
  • moving the line scan sensor is equivalent to moving the positions of the three photosensitive chips, controlling the three photosensitive chips to scan the three rows of pixels corresponding thereto respectively, and obtaining the corresponding pixel values, until the first photosensitive pixel data, the second photosensitive pixel data and the third photosensitive pixel data corresponding to all pixel rows sent by the line scan sensor are received, and the final image data can be determined, so that the final determined image does not have the problem of color edges.
  • the pixel data acquisition instruction before sending the pixel data acquisition instruction to the line scan sensor, it also includes: determining the moving pixel row; and determining the pixel data acquisition instruction and the moving predetermined pixel row instruction based on the moving pixel row.
  • the number of pixel rows collected by the pixel data collection instruction and the number of pixel rows moved by the predetermined pixel row can be determined according to the actual application and scenario. That is, the number of pixel rows desired can be determined, and then the pixel data collection instruction and the instruction for moving the predetermined pixel row can be determined based on the pixel rows to be moved.
  • the number of pixel rows moved is 1, the number of pixel rows collected by the pixel data collection instruction is set to 1, and the number of pixel rows moved by the predetermined pixel row is set to 1, that is, the pixel rows scanned by the photosensitive chip are 1, and the predetermined pixel rows are moved by 1;
  • the target moves the length of two pixels, the number of pixel rows moved is 2, the number of pixel rows collected by the pixel data collection instruction is set to 2, and the number of pixel rows moved by the predetermined pixel row is set to 1, that is, the photosensitive chip
  • the number of scanned pixel rows is 2, and the number of moved predetermined pixel rows is 1.
  • determining the target moving distance includes: obtaining a target resolution; and determining a target moving pixel row according to the target resolution.
  • a method for determining the target moving distance is disclosed.
  • high resolution is used as half the resolution pixel, such as 600DPI (Dots Per Inch) is used as 300DPI resolution
  • the moving length will change from the original 43.2um (the same as the length of one pixel above) to 84.6um (the same as the length of two pixels above), that is, the moving pixel row changes from 1 to 2.
  • the number of pixel rows collected by the pixel data collection instruction changes from 1 to 2, that is, the pixel collection can be completed.
  • the method provided by the present application can be adjusted according to different resolutions, which increases the applicability of the present solution.
  • the first photosensitive pixel data, the second photosensitive pixel data and the third photosensitive pixel data corresponding to the target pixel row before determining the target pixel data corresponding to the target pixel row, it includes: obtaining the color correction coefficient corresponding to the line scan sensor.
  • the color correction coefficient is obtained, which can eliminate the problem of color edge phenomenon caused by the participation of the color correction coefficient. Moreover, the pixel data can be corrected by the color correction coefficient so that the target pixel data finally determined can restore more realistic colors.
  • a method for determining pixel data is provided in an optional embodiment of the present invention.
  • the three rows of blue, green and red photosensitive chips of the line scan sensor are B, G, and R.
  • Three rows of pixel data can be obtained by one exposure, namely, pixel data of blue light in the row corresponding to the first position, pixel data of green light in the row corresponding to the second position, and pixel data of red light in the third position.
  • the method provided in the optional embodiment of the present invention can accurately determine the pixel information of the pixel point and eliminate the color edge phenomenon between pixel rows.
  • Figure 2 is a schematic diagram of pixels in the prior art, each pixel being composed of red, green and blue light holes.
  • the pixel data determination method provided by the optional embodiment of the present invention is to expose three times (same as the above scanning) to obtain all pixel data of a row of pixels in Figure 2.
  • FIG3 is a schematic diagram of an image after using this method provided by an optional embodiment of the present invention. As shown in FIG3, after adopting this technology, (B1, G2, R3) is multiplied by the color correction coefficient to form an image, and the color edge phenomenon disappears during the scanning process.
  • (B1, G2, R3) is multiplied by the color correction coefficient to form an image, and the color edge phenomenon disappears during the scanning process.
  • Figure 4 is a schematic diagram of pixel data determination in an optional implementation manner of the present invention. As shown in Figure 4, Figure 4 shows the process of determining the (B1, G2, R3) pixel data of the above-mentioned first row of pixels, and the dark part in the figure is the above-mentioned (B1, G2, R3) pixel data.
  • the image data corresponding to the scanning area can be determined based on the color correction coefficient, the pixel data B, pixel data G and pixel data R corresponding to each pixel row, and the target pixel data corresponding to each pixel row can be determined.
  • the pixel data of the first row pixel point is (B1, G2, R3), multiplied by the color correction coefficient. Wait until a color pixel point after color correction.
  • the pixel points obtained by the Nth, N+1th, and N+2nd exposures are also color corrected by the same algorithm.
  • FIG5 is a schematic diagram of determining pixel data in the extended solution of the optional implementation of the present invention. As shown in FIG5 , FIG5 shows the determination process of the following (B1, G1, R2) pixel data. The dark part in the figure is For the above (B1, G1, R2) pixel data, the following is a specific description of this solution:
  • the original two pixels at high resolution the first row B1 of pixel 1, the first row B1 of pixel 2, the upper row G of pixel 1, and the upper row G of pixel 2 form a new low resolution pixel.
  • the image data of three colors can be obtained by two exposures.
  • the image data of red light obtained by the first exposure is defined as R1
  • the image data of blue light is defined as B1.
  • the pixel points obtained by the Nth, N+1, and N+2nd exposures are also color corrected by the same algorithm.
  • the pixels obtained from the Nth, N+1th, and N+2nd exposures are also color corrected using the same algorithm.
  • the pixel data of the target pixel row is determined by scanning the photosensitive chips at different positions after multiple scans, and is obtained by scanning at a determined scanning position.
  • the pixel data of the target pixel row is scanned once to scan all the pixel data, which may have color edge problems.
  • the corresponding pixel data is obtained by scanning at a determined scanning position, so that the area range of the determined pixel data is standardized, and correspondingly, the determined pixel data is more accurate, that is, there will be no color edge problem, thereby solving the technical problem that when the target pixel data corresponding to the target pixel row is determined in the related art, the target pixel data will have color edges.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method.
  • the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), including a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of various embodiments of the present invention.
  • a device configured to implement the above pixel data determination method is also provided.
  • 6 is a structural block diagram of a device for determining pixel data according to an embodiment of the present invention. As shown in FIG6 , the device includes: a sending module 602, a receiving module 604, a transceiver module 606 and a determining module 608. The device is described in detail below.
  • the sending module 602 is configured to send a pixel data acquisition instruction to the line scan sensor, wherein the line scan sensor includes three photosensitive chips arranged in parallel, the three photosensitive chips correspond to three colors respectively, and the pixel data acquisition instruction is used to enable the three photosensitive chips located at different positions to scan the corresponding pixel rows respectively;
  • the receiving module 604 is connected to the above-mentioned sending module 602, and is configured to receive the first photosensitive pixel data corresponding to the target pixel row sent by the line scan sensor, wherein the first photosensitive pixel data is the photosensitive pixel data scanned by the photosensitive chip at the first position, and when obtaining the first photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the photosensitive chip at the first position;
  • the transceiver module 606 is connected to the above-mentioned receiving module 604, and is configured to cyclically send instructions for moving predetermined pixel rows and pixel data acquisition instructions to the line scan sensor in sequence.
  • the second photosensitive pixel data and the third photosensitive pixel data corresponding to the target pixel row are received from the line scan sensor, wherein the second photosensitive pixel data is the photosensitive pixel data scanned by the photosensitive chip at the second position, and the third photosensitive pixel data is the photosensitive pixel data scanned by the photosensitive chip at the third position.
  • a determination module 608 is connected to the above-mentioned transceiver module 606, and is configured 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.
  • sending module 602, receiving module 604, transceiver module 606 and determination module 608 correspond to steps S102 to S108 in the implementation of the pixel data determination method, and the instances and application scenarios implemented by the multiple modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.
  • an electronic device comprising: a processor; and a memory configured to store processor executable instructions, wherein the processor is configured to execute the instructions to implement any of the above pixel data determination methods.
  • a computer-readable storage medium When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any of the above pixel data determination methods.
  • the disclosed technical content can be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the units can be a logical function division. There may be other division methods in actual implementation.
  • multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
  • Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
  • the aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
  • a pixel data acquisition instruction is sent to a line scan sensor, wherein the line scan sensor includes three photosensitive chips arranged in parallel, and the three photosensitive chips correspond to three colors respectively.
  • the pixel data acquisition instruction is used to make the three photosensitive chips located at different positions scan the corresponding pixel rows respectively, and receive the first photosensitive image corresponding to the target pixel row sent by the line scan sensor.
  • the pixel data is obtained by scanning the pixel row, and the instruction of moving the predetermined pixel row and the pixel data acquisition instruction are sent to the line scan sensor in a circular manner until the second photosensitive pixel data and the third photosensitive pixel data corresponding to the target pixel row sent by the line scan sensor are received, wherein the first photosensitive pixel data is the photosensitive pixel data scanned by the photosensitive chip at the first position, when acquiring the first photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the photosensitive chip at the first position, the second photosensitive pixel data is the photosensitive pixel data scanned by the photosensitive chip at the second position, and the third photosensitive pixel data is the photosensitive pixel data scanned by the photosensitive chip at the third position, when acquiring the second photosensitive pixel data corresponding to the target pixel row, the target pixel row corresponds to the scanning position of the photosensitive chip at the second position, and when acquiring the third photosensitive pixel data corresponding to the target
  • 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 scanned multiple times, and is determined based on the scanning of the first position photosensitive chip, the second position photosensitive chip, and the third position photosensitive chip, respectively. It is obtained by scanning at a determined scanning position. Compared with the related art, the pixel data of the target pixel row is scanned once, and all the pixel data is scanned. After the color correction coefficient is corrected, there may be a color edge problem.
  • the corresponding pixel data is scanned at a determined scanning position, so that the area range of the determined pixel data is standardized.
  • the determined pixel data is more accurate, that is, there will be no color edge problem, thereby solving the technical problem that when the target pixel data corresponding to the target pixel row is determined in the related art, the target pixel data will have a color edge.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Facsimile Scanning Arrangements (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

本发明公开了一种像素数据确定方法、装置及电子设备。其中,该方法包括:发送像素数据采集指令至线扫传感器;接收线扫传感器发送的与目标像素行对应的第一感光像素数据;循环依次发送移动预定像素行指令与像素数据采集指令至线扫传感器,直至接收到线扫传感器发送的与目标像素行对应的第二感光像素数据与第三感光像素数据;依据与线扫传感器对应的颜色校正系数,与目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定目标像素行对应的目标像素数据。本发明解决了相关技术中确定出目标像素行对应的目标像素数据时,目标像素数据会存在彩色边缘的技术问题。

Description

像素数据确定方法、装置及电子设备 技术领域
本发明涉及图像处理领域,具体而言,涉及一种像素数据确定方法、装置及电子设备。
背景技术
目前,工业检测领域和机器视觉领域。主要采用两种方式,分别是面阵相机加各种光源,另一种就是线扫线阵传感器。线阵传感器为线性扫描,具有幅面宽,结构紧凑,节约空间,图像为1∶1图像,无畸变等优势。这种线阵相机是具有三排红绿蓝彩色芯片构成的线扫相机。每个像素点都是由红绿蓝三种像素数据组成的。在扫描过程中单个像素点多次曝光,由红绿蓝三色感光芯片组成,可以在只亮一次白光的情况下完成彩色图像的形成。但是使用该种方法确定彩色图像,容易导致确定出的图像有彩色边缘的出现,干扰最终图像的判定和识别。
针对上述的问题,目前尚未提出有效的解决方案。
发明内容
本发明实施例提供了一种像素数据确定方法、装置及电子设备,以至少解决相关技术中确定出目标像素行对应的目标像素数据时,目标像素数据会存在彩色边缘的技术问题。
根据本发明实施例的一个方面,提供了一种像素数据确定方法,包括:发送像素数据采集指令至线扫传感器,其中,所述线扫传感器中包括并行排布的三个感光芯片,所述三个感光芯片分别对应三种颜色,所述像素数据采集指令用于使位于不同位置处的所述三个感光芯片分别扫描对应的像素行;接收所述线扫传感器发送的与目标像素行对应的第一感光像素数据,其中,所述第一感光像素数据为第一位置感光芯片扫描出的感光像素数据,在获取与所述目标像素行对应的第一感光像素数据时,所述目标像素行与所述第一位置感光芯片的扫描位置对应;循环依次发送移动预定像素行指令与所述像素数据采集指令至所述线扫传感器,直至接收到所述线扫传感器发送的与所述目标像素行对应的第二感光像素数据与第三感光像素数据,其中,所述第二感光像素数据为第二位置感光芯片扫描出的感光像素数据,所述第三感光像素数据为第三位置感光芯片扫描出的感光像素数据,在获取与所述目标像素行对应的第二感光像素数据时,所述目标像素行与所述第二位置感光芯片的扫描位置对应,在获取与所述目标 像素行对应的第三感光像素数据时,所述目标像素行与所述第三位置感光芯片的扫描位置对应;依据与所述线扫传感器对应的颜色校正系数,与所述目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定所述目标像素行对应的所述目标像素数据。
可选地,所述发送像素数据采集指令至线扫传感器之前,还包括:获取所述线扫传感器扫描被扫描物体的扫描区域;依据所述扫描区域,确定所述扫描传感器的初始扫描位置;发送位置调节指令至所述线扫传感器,其中,所述位置调节指令携带有所述初始扫描位置。
可选地,所述依据与所述目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定所述目标像素行对应的目标像素数据之后,还包括:依据所述扫描区域,确定所述扫描传感器的终点扫描位置;确定所述初始扫描位置至所述终点扫描位置所经过的所有像素行;循环依次发送所述移动预定像素行指令与所述像素数据采集指令至所述线扫传感器,直至接收到所述线扫传感器发送的与所述所有像素行分别对应的第一感光像素数据,第二感光像素数据与第三感光像素数据;依据与所述所有像素行分别对应的第一感光像素数据,第二感光像素数据与第三感光像素数据,确定与所述扫描区域对应的图像数据。
可选地,所述发送像素数据采集指令至线扫传感器之前,还包括:确定移动像素行;依据所述移动像素行,确定所述像素数据采集指令与所述移动预定像素行指令。
可选地,所述确定移动像素行,包括:获取目标分辨率;依据所述目标分辨率,确定所述目标移动像素行。
可选地,所述依据与所述线扫传感器对应的颜色校正系数,与所述目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定所述目标像素行对应的所述目标像素数据之前,包括:获取与所述线扫传感器对应的颜色校正系数。
可选地,所述三个感光芯片,包括:蓝光感光芯片,绿光感光芯片,红光感光芯片。
根据本发明实施例的一个方面,提供了一种像素数据确定装置,包括:发送模块,设置为发送像素数据采集指令至线扫传感器,其中,所述线扫传感器中包括三个感光芯片,所述三个感光芯片分别处于不同的位置,所述像素数据采集指令用于使位于不同位置处的所述三个感光芯片分别扫描对应的像素行;接收模块,设置为接收所述线扫传感器发送的与目标像素行对应的第一感光像素数据,其中,所述第一感光像素数据为第一位置感光芯片扫描出的感光像素数据,在获取与所述目标像素行对应的第一感光像素数据时,所述目标像素行与所述第一位置感光芯片的扫描位置对应;收发模 块,设置为循环依次发送移动预定像素行指令与所述像素数据采集指令至所述线扫传感器,直至接收到所述线扫传感器发送的与所述目标像素行对应的第二感光像素数据与第三感光像素数据,其中,所述第二感光像素数据为第二位置感光芯片扫描出的感光像素数据,所述第三感光像素数据为第三位置感光芯片扫描出的感光像素数据,在获取与所述目标像素行对应的第二感光像素数据时,所述目标像素行与所述第二位置感光芯片的扫描位置对应,在获取与所述目标像素行对应的第三感光像素数据时,所述目标像素行与所述第三位置感光芯片的扫描位置对应;确定模块,设置为依据与所述目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定所述目标像素行对应的目标像素数据。
根据本发明实施例的一个方面,提供了一种电子设备,包括:处理器;设置为存储所述处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令,以实现如上述任一项所述的像素数据确定方法。
根据本发明实施例的一个方面,提供了一种计算机可读存储介质,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行如上述任一项所述的像素数据确定方法。
在本发明实施例中,发送像素数据采集指令至线扫传感器,其中,线扫传感器中包括并行排布的三个感光芯片,三个感光芯片分别对应三种颜色,像素数据采集指令用于使位于不同位置处的三个感光芯片分别扫描对应的像素行,接收线扫传感器发送的与目标像素行对应的第一感光像素数据,再循环依次发送移动预定像素行指令与像素数据采集指令至线扫传感器,直至接收到线扫传感器发送的与目标像素行对应的第二感光像素数据与第三感光像素数据,其中,第一感光像素数据为第一位置感光芯片扫描出的感光像素数据,在获取与目标像素行对应的第一感光像素数据时,目标像素行与第一位置感光芯片的扫描位置对应,第二感光像素数据为第二位置感光芯片扫描出的感光像素数据,第三感光像素数据为第三位置感光芯片扫描出的感光像素数据,在获取与目标像素行对应的第二感光像素数据时,目标像素行与第二位置感光芯片的扫描位置对应,在获取与目标像素行对应的第三感光像素数据时,目标像素行与第三位置感光芯片的扫描位置对应。依据与线扫传感器对应的颜色校正系数,与目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定目标像素行对应的目标像素数据。即目标像素行的像素数据是经过多次扫描,分别依据第一位置感光芯片,第二位置感光芯片与第三位置感光芯片扫描确定出的,是在确定的扫描位置扫描得到的,相对于相关技术中,目标像素行的像素数据由一次扫描,扫描出全部的像素数据,颜色校正系数校正后,可能会存在色彩边缘的问题。在确定的扫描位置扫描得到对应的像素数据,使得确定出的像素数据的区域范围都是规范的,相对应的,确定出的像素数据是更准确的,即不会出现色彩边缘的问题,进而解决了相关技 术中确定出目标像素行对应的目标像素数据时,目标像素数据会存在彩色边缘的技术问题。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的像素数据确定方法的流程图;
图2是现有技术中像素点的示意图;
图3是本发明可选实施方式提供的使用本方法后的图像示意图;
图4是本发明可选实施方式中的像素数据确定示意图;
图5是本发明可选实施方式的扩展方案中的像素数据确定示意图;
图6是根据本发明实施例的像素数据确定装置的结构框图。
具体实施方式
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
实施例1
根据本发明实施例,提供了一种像素数据确定方法的实施例,需要说明的是,在 附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
图1是根据本发明实施例的像素数据确定方法的流程图,如图1所示,该方法包括如下步骤:
步骤S102,发送像素数据采集指令至线扫传感器,其中,线扫传感器中包括并行排布的三个感光芯片,三个感光芯片分别对应三种颜色,像素数据采集指令用于使位于不同位置处的三个感光芯片分别扫描对应的像素行;
在本申请所记载的步骤S102中,通过发送像素数据采集指令至线扫传感器,能够使得素数据采集指令用于使位于不同位置处的三个感光芯片分别扫描对应的像素行。假设在像素为3*3的图像中,第一位置感光芯片扫描第一行3个像素点的像素数据,第二位置感光芯片扫描第二行3个像素点的像素数据,第三位置感光芯片扫描第三行3个像素点的像素数据,达到了每个感光芯片扫描与之正对应位置处的像素行,使得像素行中像素确定的数据更为准确。
作为一种可选的实施例,三个感光芯片,包括:蓝光感光芯片,绿光感光芯片,红光感光芯片。在该实施例中,蓝光感光芯片能够获取B像素数据,绿光感光芯片能够获取G像素数据,红光感光芯片能够获取R像素数据,即如上述的例子,假设蓝光感光芯片,绿光感光芯片,红光感光芯片分别位于第一位置、第二位置、第三位置。第一位置感光芯片,即蓝色感光芯片扫描第一行3个像素点的B像素数据,第二位置感光芯片,即绿色感光芯片扫描第二行3个像素点的G像素数据,第三位置感光芯片,即红色感光芯片扫描第三行3个像素点的R像素数据。
步骤S104,接收线扫传感器发送的与目标像素行对应的第一感光像素数据,其中,第一感光像素数据为第一位置感光芯片扫描出的感光像素数据,在获取与目标像素行对应的第一感光像素数据时,目标像素行与第一位置感光芯片的扫描位置对应;
在本申请所记载的步骤S104中,在获取与目标像素行对应的第一感光像素数据时,目标像素行与第一位置感光芯片的扫描位置对应,使得得到的第一感光像素数据是出于与第一位置感光芯片的扫描位置对应的位置处的,能够准确扫描得到第一感光像素数据。
步骤S106,循环依次发送移动预定像素行指令与像素数据采集指令至线扫传感器,直至接收到线扫传感器发送的与目标像素行对应的第二感光像素数据与第三感光像素数据,其中,第二感光像素数据为第二位置感光芯片扫描出的感光像素数据,第三感光像素数据为第三位置感光芯片扫描出的感光像素数据,在获取与目标像素行对应的 第二感光像素数据时,目标像素行与第二位置感光芯片的扫描位置对应,在获取与目标像素行对应的第三感光像素数据时,目标像素行与第三位置感光芯片的扫描位置对应:
在本申请所记载的步骤S106中,通过该步骤,能够通过移动线扫传感器,获取目标像素行全部的像素数据,即第一感光像素数据,第二感光像素数据,第三感光像素数据,使得第一感光像素数据,第二感光像素数据,第三感光像素数据都是被处于正对应位置处的第一位置感光芯片,第二位置感光芯片,第三位置感光芯片分别扫描得到的。
步骤S108,依据与线扫传感器对应的颜色校正系数,与目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定目标像素行对应的目标像素数据。
在本申请所记载的步骤S108中,通过该步骤,获取了颜色校正系数参与了校正,使用相关技术中获取像素数据的方法获取像素数据,并依据颜色校正系数进行校正时,会出现色彩边缘现象。因此,通过该步骤,能够消除在颜色校正系数的参与下,出现色彩边缘现象的问题。而且,通过颜色校正系数,能够校正像素数据,使得最终确定出的目标像素数据能够还原更真实的色彩。
通过上述步骤,发送像素数据采集指令至线扫传感器,其中,线扫传感器中包括并行排布的三个感光芯片,三个感光芯片分别对应三种颜色,像素数据采集指令用于使位于不同位置处的三个感光芯片分别扫描对应的像素行,接收线扫传感器发送的与目标像素行对应的第一感光像素数据,再循环依次发送移动预定像素行指令与像素数据采集指令至线扫传感器,直至接收到线扫传感器发送的与目标像素行对应的第二感光像素数据与第三感光像素数据,其中,第一感光像素数据为第一位置感光芯片扫描出的感光像素数据,在获取与目标像素行对应的第一感光像素数据时,目标像素行与第一位置感光芯片的扫描位置对应,第二感光像素数据为第二位置感光芯片扫描出的感光像素数据,第三感光像素数据为第三位置感光芯片扫描出的感光像素数据,在获取与目标像素行对应的第二感光像素数据时,目标像素行与第二位置感光芯片的扫描位置对应,在获取与目标像素行对应的第三感光像素数据时,目标像素行与第三位置感光芯片的扫描位置对应。依据与线扫传感器对应的颜色校正系数,与目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定目标像素行对应的目标像素数据。即目标像素行的像素数据是经过多次扫描,分别依据第一位置感光芯片,第二位置感光芯片与第三位置感光芯片扫描确定出的,是在确定的扫描位置扫描得到的,相对于相关技术中,目标像素行的像素数据由一次扫描,扫描出全部的像素数据,颜色校正系数校正后,可能会存在色彩边缘的问题。在确定的扫描位置扫 描得到对应的像素数据,使得确定出的像素数据的区域范围都是规范的,相对应的,确定出的像素数据是更准确的,即不会出现色彩边缘的问题,进而解决了相关技术中确定出目标像素行对应的目标像素数据时,目标像素数据会存在彩色边缘的技术问题。
作为一种可选的实施例,发送像素数据采集指令至线扫传感器之前,还包括:获取线扫传感器扫描被扫描物体的扫描区域;依据扫描区域,确定扫描传感器的初始扫描位置;发送位置调节指令至线扫传感器,其中,位置调节指令携带有初始扫描位置。
在该实施例中,当线扫传感器要扫描一个被扫描物体时,是能够确定出包括这个被扫描物体的扫描区域的。依据这个扫描区域,确定出扫描传感器的初始扫描位置,发送位置调节指令至线扫传感器,使得线扫传感器响应于位置调节指令到达初始扫描位置,以便完成整个扫描区域的图像处理。
作为一种可选的实施例,依据与目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定目标像素行对应的目标像素数据之后,还包括:依据扫描区域,确定扫描传感器的终点扫描位置;确定初始扫描位置至终点扫描位置所经过的所有像素行;循环依次发送移动预定像素行指令与像素数据采集指令至线扫传感器,直至接收到线扫传感器发送的与所有像素行分别对应的第一感光像素数据,第二感光像素数据与第三感光像素数据;依据与所有像素行分别对应的第一感光像素数据,第二感光像素数据与第三感光像素数据,确定与扫描区域对应的图像数据。
在该实施例中,获取扫描区域所有像素行的像素数据,以确定出与扫描区域对应的图像数据。可以理解的为,移动线扫传感器,相当于也移动了三个感光芯片的位置,控制三个感光芯片分别扫描与之对应的三行像素,得到对应的像素值,直至接收到线扫传感器发送的与所有像素行分别对应的第一感光像素数据,第二感光像素数据与第三感光像素数据,能够确定出最终的图像数据,使得最终确定出的图像不存在色彩边缘的问题。
作为一种可选的实施例,发送像素数据采集指令至线扫传感器之前,还包括:确定移动像素行;依据移动像素行,确定像素数据采集指令与移动预定像素行指令。
在该实施例中,像素数据采集指令采集的像素行数以及移动预定像素行所移动的像素行数都是可以根据实际的应用与场景确定的。即可以确定出想要多少像素行,便依据移动像素行,确定像素数据采集指令与移动预定像素行指令。例如,若目标移动一个像素的长度,则移动像素行为1,像素数据采集指令采集的像素行数定为1以及移动预定像素行所移动的像素行数定为1,即感光芯片扫描的像素行为1行,移动预定像素行为1行;若目标移动两个像素的长度,则移动像素行为2,像素数据采集指令采集的像素行数定为2以及移动预定像素行所移动的像素行数定为1,即感光芯片 扫描的像素行为2行,移动预定像素行为1行。通过进行不同的设置,可以满足不同应用与场景的需求,扩大本申请的保护范围。
作为一种可选的实施例,确定目标移动距离,包括:获取目标分辨率;依据目标分辨率,确定目标移动像素行。
在该实施例中,公开了一种确定目标移动距离的方法,例如,高分辨率当做降低一半的分辨率像素使用时,如600DPI(Dots Per Inch,每英寸点数)当做300DPI的分辨率用时,移动长度就会由原来的43.2um(同上述一个像素的长度),变为84.6um(同上述二个像素的长度),即移动像素行由1变成了2,此时,像素数据采集指令采集的像素行数由1变成了2,即可以完成像素的采集。使得本申请所提供的方法可以根据不同的分辨率进行调整,增加了本方案的适用性。
作为一种可选的实施例,依据与线扫传感器对应的颜色校正系数,与目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定目标像素行对应的目标像素数据之前,包括:获取与线扫传感器对应的颜色校正系数。
在该实施例中,获取了颜色校正系数,能够消除在颜色校正系数的参与下,出现色彩边缘现象的问题。而且,通过颜色校正系数,能够校正像素数据,使得最终确定出的目标像素数据能够还原更真实的色彩。
基于上述实施例及可选实施例,提供了一种可选实施方式,下面具体说明。
本发明可选实施方式中提供了一种像素数据确定方法,以线扫传感器为蓝绿红三排感光芯片并行排布的线扫传感器,即蓝色感光芯片处于第一位置,绿色感光芯片处于第二位置,红色感光芯片处于第三位置为例,线扫传感器的蓝绿红三排感光芯片为B,G,R,一次曝光可以获得三行像素数据分别是,第一位置处对应行的蓝光的像素数据,第二位置处对应行的绿光的像素数据,第三位置处对应的红光的像素数据,通过本发明可选实施方式提供的方法能够准确地确定出像素点的像素信息,消除像素行之间存在的色彩边缘现象。
图2是现有技术中像素点的示意图,每个像素点都是由红绿蓝三种颜色光孔组成的。本发明可选实施方式提供的像素数据确定方法将分三次曝光(同上述扫描),获取如图2中一行像素点的全部像素数据。
现有技术中直接将(B1,G1,R1)×颜色校正系数后形成的图像会有彩色边缘现象出现。图3是本发明可选实施方式提供的使用本方法后的图像示意图,如图3所示,采用了该技术后,将(B1,G2,R3)×颜色校正系数后形成图像,扫描过程中,彩色边缘现象消失。下面对本发明可选实施方式进行详细介绍:
S1,获取线扫传感器扫描被扫描物体的扫描区域;
S2,依据扫描区域,确定扫描传感器的初始扫描位置;
S3,发送位置调节指令至线扫传感器,使线扫传感器移至初始扫描位置,即使得蓝光感光芯片能够扫描到第一行的像素点;
S4,发送像素数据采集指令至线扫传感器,使线扫传感器曝光扫描,获得第一行的像素数据,定义成B1,即此时第一行的像素点的B1像素数据,由于蓝色感光芯片位于第一位置刚能够扫描到第一行的像素点,因此,位于蓝色感光芯片之后的绿色感光芯片与红色感光芯片是无法得到像素点的像素数据的;
S5,发送移动预定像素行指令与像素数据采集指令至线扫传感器,使得线扫传感器向预定方位移动一行,使线扫传感器曝光扫描,获得第一行的像素数据G2,以及第二行的像素数据B2;
S6,再次发送移动预定像素行指令与像素数据采集指令至线扫传感器,使得线扫传感器向预定方位再移动一行,使线扫传感器曝光扫描,获得第一行的像素数据R3,以及第二行的像素数据G3,以及第三行的像素数据B3;
需要说明的是,图4是本发明可选实施方式中的像素数据确定示意图,如图4所示,图4中即示出了上述第一行像素点的(B1,G2,R3)像素数据的确定过程,图中深色部分即为上述(B1,G2,R3)像素数据。
S7,直至接收到线扫传感器发送的与所有像素行分别对应的像素数据B,像素数据G与像素数据R;
S8,依据颜色校正系数,与所有像素行对应的像素数据B,像素数据G与像素数据R,确定与扫描区域对应的图像数据。
需要说明的是,在上述过程中,确定与扫描区域对应的图像数据,可以是依据颜色校正系数,与每像素行对应的像素数据B,像素数据G与像素数据R,确定每像素行对应的目标像素数据的,例如,对于第一行中的某个像素点来说,第一行像素点的像素数据为(B1,G2,R3),乘以颜色校正系数。等到一个颜色校正后的彩色像素点。以此类推第N,N+1,N+2次曝光获得的像素点也以同样算法做颜色校正。
可选地,基于上述可选实施方式,本申请又提出来一种高分辨率换算成低分辨率用的扩展方案,图5是本发明可选实施方式的扩展方案中的像素数据确定示意图,如图5所示,图5中即示出了下述(B1,G1,R2)像素数据的确定过程,图中深色部分即 为上述(B1,G1,R2)像素数据,下面对本方案进行具体说明:
由于高分辨率换算成低分辨率用,所以原来高分辨率时的两个像素点:像素1的第一行B1,像素2的第一行B1,像素1的上行G,像素2的上行G四个像素点,组成1个新的低分辨率像素点。假设从扫描区域的中间位置开始扫描,扫描方向从像素点中的B运动到R时,对于一种蓝绿红三排感光芯片依次排列的线扫相机,获得三种颜色的图像数据可以分两次曝光的。第一次曝光获得红光的图像数据定义为R1,蓝光的图像数据B1。当移动到1/2line时开始第二次曝光获得绿光的图像数据G1;当移动到1line时,曝光获得像素数据R2,B2;将(B1,G1,R2)×颜色校正系数=红绿蓝R,G,B三色灰度值合成彩色点作为第一行彩色像素点。以此类推第N,N+1,N+2次曝光获得的像素点也以同样算法做颜色校正。以此类推第N,N+1,N+2次曝光获得的像素点也以同样算法做颜色校正。
通过上述可选实施方式,可以达到至少以下的有益效果:目标像素行的像素数据是经过多次扫描,分别由第不同位置处的感光芯片扫描确定出的,是在确定的扫描位置扫描得到的,相对于相关技术中,目标像素行的像素数据由一次扫描,扫描出全部的像素数据,可能会存在色彩边缘的问题。在确定的扫描位置扫描得到对应的像素数据,使得确定出的像素数据的区域范围都是规范的,相对应的,确定出的像素数据是更准确的,即不会出现色彩边缘的问题,进而解决了相关技术中确定出目标像素行对应的目标像素数据时,目标像素数据会存在彩色边缘的技术问题。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例的方法。
实施例2
根据本发明实施例,还提供了一种设置为实施上述像素数据确定方法的装置,图 6是根据本发明实施例的像素数据确定装置的结构框图,如图6所示,该装置包括:发送模块602,接收模块604,收发模块606和确定模块608,下面对该装置进行详细说明。
发送模块602,设置为发送像素数据采集指令至线扫传感器,其中,线扫传感器中包括并行排布的三个感光芯片,三个感光芯片分别对应三种颜色,像素数据采集指令用于使位于不同位置处的三个感光芯片分别扫描对应的像素行;接收模块604,连接于上述发送模块602,设置为接收线扫传感器发送的与目标像素行对应的第一感光像素数据,其中,第一感光像素数据为第一位置感光芯片扫描出的感光像素数据,在获取与目标像素行对应的第一感光像素数据时,目标像素行与第一位置感光芯片的扫描位置对应;收发模块606,连接于上述接收模块604,设置为循环依次发送移动预定像素行指令与像素数据采集指令至线扫传感器,直至接收到线扫传感器发送的与目标像素行对应的第二感光像素数据与第三感光像素数据,其中,第二感光像素数据为第二位置感光芯片扫描出的感光像素数据,第三感光像素数据为第三位置感光芯片扫描出的感光像素数据,在获取与目标像素行对应的第二感光像素数据时,目标像素行与第二位置感光芯片的扫描位置对应,在获取与目标像素行对应的第三感光像素数据时,目标像素行与第三位置感光芯片的扫描位置对应;确定模块608,连接于上述收发模块606,设置为依据与线扫传感器对应的颜色校正系数,与目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定目标像素行对应的目标像素数据。
此处需要说明的是,上述发送模块602,接收模块604,收发模块606和确定模块608对应于实施像素数据确定方法中的步骤S102至步骤S108,多个模块与对应的步骤所实现的实例和应用场景相同,但不限于上述实施例1所公开的内容。
实施例3
根据本发明实施例的另外一个方面,还提供了一种电子设备,包括:处理器;设置为存储处理器可执行指令的存储器,其中,处理器被配置为执行指令,以实现上述任一项的像素数据确定方法。
实施例4
根据本发明实施例的另外一个方面,还提供了一种计算机可读存储介质,当计算机可读存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行上述任一项的像素数据确定方法。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
在本发明的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,可以为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。
工业实用性
本申请实施例提供的方案可应用于图像处理领域,在本申请实施例中,发送像素数据采集指令至线扫传感器,其中,线扫传感器中包括并行排布的三个感光芯片,三个感光芯片分别对应三种颜色,像素数据采集指令用于使位于不同位置处的三个感光芯片分别扫描对应的像素行,接收线扫传感器发送的与目标像素行对应的第一感光像 素数据,再循环依次发送移动预定像素行指令与像素数据采集指令至线扫传感器,直至接收到线扫传感器发送的与目标像素行对应的第二感光像素数据与第三感光像素数据,其中,第一感光像素数据为第一位置感光芯片扫描出的感光像素数据,在获取与目标像素行对应的第一感光像素数据时,目标像素行与第一位置感光芯片的扫描位置对应,第二感光像素数据为第二位置感光芯片扫描出的感光像素数据,第三感光像素数据为第三位置感光芯片扫描出的感光像素数据,在获取与目标像素行对应的第二感光像素数据时,目标像素行与第二位置感光芯片的扫描位置对应,在获取与目标像素行对应的第三感光像素数据时,目标像素行与第三位置感光芯片的扫描位置对应。依据与线扫传感器对应的颜色校正系数,与目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定目标像素行对应的目标像素数据。即目标像素行的像素数据是经过多次扫描,分别依据第一位置感光芯片,第二位置感光芯片与第三位置感光芯片扫描确定出的,是在确定的扫描位置扫描得到的,相对于相关技术中,目标像素行的像素数据由一次扫描,扫描出全部的像素数据,颜色校正系数校正后,可能会存在色彩边缘的问题。在确定的扫描位置扫描得到对应的像素数据,使得确定出的像素数据的区域范围都是规范的,相对应的,确定出的像素数据是更准确的,即不会出现色彩边缘的问题,进而解决了相关技术中确定出目标像素行对应的目标像素数据时,目标像素数据会存在彩色边缘的技术问题。

Claims (10)

  1. 一种像素数据确定方法,包括:
    发送像素数据采集指令至线扫传感器,其中,所述线扫传感器中包括并行排布的三个感光芯片,所述三个感光芯片分别对应三种颜色,所述像素数据采集指令用于使位于不同位置处的所述三个感光芯片分别扫描对应的像素行;
    接收所述线扫传感器发送的与目标像素行对应的第一感光像素数据,其中,所述第一感光像素数据为第一位置感光芯片扫描出的感光像素数据,在获取与所述目标像素行对应的第一感光像素数据时,所述目标像素行与所述第一位置感光芯片的扫描位置对应;
    循环依次发送移动预定像素行指令与所述像素数据采集指令至所述线扫传感器,直至接收到所述线扫传感器发送的与所述目标像素行对应的第二感光像素数据与第三感光像素数据,其中,所述第二感光像素数据为第二位置感光芯片扫描出的感光像素数据,所述第三感光像素数据为第三位置感光芯片扫描出的感光像素数据,在获取与所述目标像素行对应的第二感光像素数据时,所述目标像素行与所述第二位置感光芯片的扫描位置对应,在获取与所述目标像素行对应的第三感光像素数据时,所述目标像素行与所述第三位置感光芯片的扫描位置对应;
    依据与所述线扫传感器对应的颜色校正系数,与所述目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定所述目标像素行对应的所述目标像素数据。
  2. 根据权利要求1所述的方法,其中,所述发送像素数据采集指令至线扫传感器之前,还包括:
    获取所述线扫传感器扫描被扫描物体的扫描区域;
    依据所述扫描区域,确定所述扫描传感器的初始扫描位置;
    发送位置调节指令至所述线扫传感器,其中,所述位置调节指令携带有所述初始扫描位置。
  3. 根据权利要求2所述的方法,其中,所述依据与所述目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定所述目标像素行对应的目标像素数据之后,还包括:
    依据所述扫描区域,确定所述扫描传感器的终点扫描位置;
    确定所述初始扫描位置至所述终点扫描位置所经过的所有像素行;
    循环依次发送所述移动预定像素行指令与所述像素数据采集指令至所述线扫传感器,直至接收到所述线扫传感器发送的与所述所有像素行分别对应的第一感光像素数据,第二感光像素数据与第三感光像素数据;
    依据与所述所有像素行分别对应的第一感光像素数据,第二感光像素数据与第三感光像素数据,确定与所述扫描区域对应的图像数据。
  4. 根据权利要求1所述的方法,其中,所述发送像素数据采集指令至线扫传感器之前,还包括:
    确定移动像素行;
    依据所述移动像素行,确定所述像素数据采集指令与所述移动预定像素行指令。
  5. 根据权利要求4所述的方法,其中,所述确定移动像素行,包括:
    获取目标分辨率;
    依据所述目标分辨率,确定所述目标移动像素行。
  6. 根据权利要求1所述的方法,其中,所述依据与所述线扫传感器对应的颜色校正系数,与所述目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定所述目标像素行对应的所述目标像素数据之前,包括:
    获取与所述线扫传感器对应的颜色校正系数。
  7. 根据权利要求1至6中任意一项所述的方法,其中,所述三个感光芯片,包括:蓝光感光芯片,绿光感光芯片,红光感光芯片。
  8. 一种像素数据确定装置,包括:
    发送模块,设置为发送像素数据采集指令至线扫传感器,其中,所述线扫传感器中包括并行排布的三个感光芯片,所述三个感光芯片分别对应三种颜色,所述像素数据采集指令用于使位于不同位置处的所述三个感光芯片分别扫描对应的像素行;
    接收模块,设置为接收所述线扫传感器发送的与目标像素行对应的第一感光像素数据,其中,所述第一感光像素数据为第一位置感光芯片扫描出的感光像素数据,在获取与所述目标像素行对应的第一感光像素数据时,所述目标像素行与所述第一位置感光芯片的扫描位置对应;
    收发模块,设置为循环依次发送移动预定像素行指令与所述像素数据采集指 令至所述线扫传感器,直至接收到所述线扫传感器发送的与所述目标像素行对应的第二感光像素数据与第三感光像素数据,其中,所述第二感光像素数据为第二位置感光芯片扫描出的感光像素数据,所述第三感光像素数据为第三位置感光芯片扫描出的感光像素数据,在获取与所述目标像素行对应的第二感光像素数据时,所述目标像素行与所述第二位置感光芯片的扫描位置对应,在获取与所述目标像素行对应的第三感光像素数据时,所述目标像素行与所述第三位置感光芯片的扫描位置对应;
    确定模块,设置为依据与所述线扫传感器对应的颜色校正系数,与所述目标像素行对应的第一感光像素数据、第二感光像素数据与第三感光像素数据,确定所述目标像素行对应的所述目标像素数据。
  9. 一种电子设备,包括:
    处理器;
    设置为存储所述处理器可执行指令的存储器;
    其中,所述处理器被配置为执行所述指令,以实现如权利要求1至7中任一项所述的像素数据确定方法。
  10. 一种计算机可读存储介质,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行如权利要求1至7中任一项所述的像素数据确定方法。
PCT/CN2023/102899 2022-11-24 2023-06-27 像素数据确定方法、装置及电子设备 WO2024109028A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211484430.6 2022-11-24
CN202211484430.6A CN115866422A (zh) 2022-11-24 2022-11-24 像素数据确定方法、装置及电子设备

Publications (1)

Publication Number Publication Date
WO2024109028A1 true WO2024109028A1 (zh) 2024-05-30

Family

ID=85666038

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/102899 WO2024109028A1 (zh) 2022-11-24 2023-06-27 像素数据确定方法、装置及电子设备

Country Status (2)

Country Link
CN (1) CN115866422A (zh)
WO (1) WO2024109028A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115866422A (zh) * 2022-11-24 2023-03-28 威海华菱光电股份有限公司 像素数据确定方法、装置及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413805A (zh) * 2018-04-25 2019-11-05 杭州海康威视数字技术股份有限公司 一种图像存储方法、装置、电子设备及存储介质
US20190356818A1 (en) * 2018-05-18 2019-11-21 Canon Kabushiki Kaisha Image forming apparatus, method of generating image data therefor and storage medium
CN113676675A (zh) * 2021-08-16 2021-11-19 Oppo广东移动通信有限公司 图像生成方法、装置、电子设备和计算机可读存储介质
CN113824935A (zh) * 2021-09-23 2021-12-21 合肥埃科光电科技有限公司 伪彩色线扫描相机的时间延迟积分方法、装置及设备
CN115866422A (zh) * 2022-11-24 2023-03-28 威海华菱光电股份有限公司 像素数据确定方法、装置及电子设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314571A (zh) * 2020-01-21 2020-06-19 许之敏 一种扫描成像方法、计算机设备和存储介质
CN113315906B (zh) * 2021-04-20 2023-04-28 维沃移动通信(杭州)有限公司 图像处理方法、装置及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413805A (zh) * 2018-04-25 2019-11-05 杭州海康威视数字技术股份有限公司 一种图像存储方法、装置、电子设备及存储介质
US20190356818A1 (en) * 2018-05-18 2019-11-21 Canon Kabushiki Kaisha Image forming apparatus, method of generating image data therefor and storage medium
CN113676675A (zh) * 2021-08-16 2021-11-19 Oppo广东移动通信有限公司 图像生成方法、装置、电子设备和计算机可读存储介质
CN113824935A (zh) * 2021-09-23 2021-12-21 合肥埃科光电科技有限公司 伪彩色线扫描相机的时间延迟积分方法、装置及设备
CN115866422A (zh) * 2022-11-24 2023-03-28 威海华菱光电股份有限公司 像素数据确定方法、装置及电子设备

Also Published As

Publication number Publication date
CN115866422A (zh) 2023-03-28

Similar Documents

Publication Publication Date Title
CN101304484B (zh) 成像装置、缺陷像素校正装置、和装置中的处理方法
DE112009005418B4 (de) Bildverarbeitungsgerät
WO2024109028A1 (zh) 像素数据确定方法、装置及电子设备
JPH09130539A (ja) カラー走査を行う方法及びデジタルカラー走査システム
CN1897636A (zh) 利用中心图像校正数据来处理图像的系统和方法
JP5660711B2 (ja) 復元ゲインデータ生成方法
CN101939997A (zh) 采用与光源相关的色彩校正矩阵进行色彩校正的图像传感器装置及方法
US8284278B2 (en) Image processing apparatus, imaging apparatus, method of correction coefficient calculation, and storage medium storing image processing program
US20070280529A1 (en) External-Appearance Inspection Apparatus
JPH11161773A (ja) 画像処理方法及び画像入力装置
WO2023016146A1 (zh) 图像传感器、图像采集装置、图像处理方法及图像处理器
EP1357514B1 (en) Method for obtaining a high-resolution digital image
WO2001026039B1 (en) Gel electrophoresis image warping
CN115100037A (zh) 基于多线扫相机图像拼接的大幅面瓷砖成像方法及系统
JPH0879529A (ja) 画像処理装置
US7227991B2 (en) Method for improving the quality of a digital image
JP2000307884A (ja) 既存の銀塩プリントを利用するネガフィルム走査の色及び階調補正
US20020051249A1 (en) One-button-triggered image processing unit
JP2007049301A (ja) 画像処理装置及び画像処理方法
EP1687689A2 (en) System and method for effectively performing an image data transformation procedure
JP2000315784A (ja) カラー撮像素子及び撮像装置
TWI405144B (zh) 影像校正方法、影像校正單元及應用其之影像擷取裝置
CN111242087A (zh) 物体识别方法及装置
CN117176933B (zh) 一种图像信号处理方法及装置、电子设备和存储介质
JPH11308474A (ja) 画像処理装置