CN114071099A - Smear measuring method, smear measuring device, electronic device and readable storage medium - Google Patents
Smear measuring method, smear measuring device, electronic device and readable storage medium Download PDFInfo
- Publication number
- CN114071099A CN114071099A CN202010783316.8A CN202010783316A CN114071099A CN 114071099 A CN114071099 A CN 114071099A CN 202010783316 A CN202010783316 A CN 202010783316A CN 114071099 A CN114071099 A CN 114071099A
- Authority
- CN
- China
- Prior art keywords
- correction
- image
- lines
- smear
- test image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title abstract description 40
- 238000012937 correction Methods 0.000 claims abstract description 70
- 238000012360 testing method Methods 0.000 claims abstract description 60
- 238000005259 measurement Methods 0.000 claims abstract description 20
- 238000000691 measurement method Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 15
- 238000003705 background correction Methods 0.000 claims description 10
- 238000004891 communication Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 8
- 238000003384 imaging method Methods 0.000 description 5
- 239000000243 solution Substances 0.000 description 4
- 230000003993 interaction Effects 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008447 perception Effects 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 229910000831 Steel Inorganic materials 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000012482 calibration solution Substances 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000010959 steel Substances 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/12—Picture reproducers
- H04N9/31—Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
- H04N9/3191—Testing thereof
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02E—REDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
- Y02E60/00—Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
- Y02E60/10—Energy storage using batteries
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
Abstract
The application provides a smear measuring method, a smear measuring device, an electronic device and a computer readable storage medium, wherein the method comprises the following steps: acquiring a test image acquired by a camera device; converting the test image into an XYZ space, and acquiring a single-channel image by using Y-channel data; correcting by using a preset gamma value according to the single-channel image to obtain a correction image; and positioning all lines of the correction graph to obtain the line widths corresponding to the two adjacent lines. It is thus clear that this application passes through camera device collection test image to Y channel data in the XYZ space that corresponds according to test image obtains single channel image promptly luminance image, because people's eye experience is not linear with luminance, consequently adopts preset gamma numerical value to rectify, realizes and feels unanimous with people's eye, then confirms the linewidth again according to the correction map, has avoided the problem that the measurement that correlation technique adopted the manual work to carry out the smear causes is inefficient.
Description
Technical Field
The present disclosure relates to the field of projector technologies, and in particular, to a smear measurement method and apparatus, an electronic device, and a computer-readable storage medium.
Background
The core imaging device of the projector is a DMD chip, and essentially, the DMD chip is a controller with a plurality of small mirrors, is used for reflecting light to form an image, and is a very precise product. A pixel point on the DMD chip can generate smear after being imaged by the lens, the better the lens smear is, and the evaluation index is the width of the smear. The general measuring method is to play a test chart and then manually measure the chart by using a ruler, wherein the measuring method has two directions of horizontal and vertical, and the measuring method is generally 3-6 mm. The measuring method comprises the following steps: and adjusting the projection size to 80 inches, playing a test chart, and finding out a minimum scale capable of covering the line width, wherein the corresponding reading of the scale is flare. But it is inefficient to use manual measurements.
Therefore, how to provide a solution to the above technical problem is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
An object of the present application is to provide a smear measurement method, apparatus, electronic device, and computer-readable storage medium, which can improve measurement efficiency. The specific scheme is as follows:
the application provides a smear measuring method, which comprises the following steps:
acquiring a test image acquired by a camera device;
converting the test image into an XYZ space, and acquiring a single-channel image by using Y-channel data;
correcting by using a preset gamma value according to the single-channel image to obtain a correction image;
and positioning all lines of the correction graph to obtain the line widths corresponding to all adjacent two lines.
Preferably, before the acquiring the test image collected by the camera device, the method further includes:
and sequentially carrying out distortion correction, flat field correction and position correction on the camera device.
Preferably, the positioning of all lines on the correction map to obtain line widths corresponding to all adjacent two lines includes:
when the test image is a grid test image, acquiring rectangular areas corresponding to two adjacent black squares from the correction image, wherein the rectangular areas comprise the lines;
obtaining the centroids of the two rectangular areas;
performing linear fitting according to all the centroids of each row or each column to obtain line information of the line;
and acquiring the line width according to the information of two adjacent lines.
Preferably, the linear fitting according to all the centroids of each row or each column to obtain the line information of the line includes:
performing linear fitting on all the centroids of each row or each column to obtain a slope and an intercept;
judging whether the slopes of two adjacent lines are consistent;
and if the slopes of two adjacent lines are consistent, obtaining the line width according to the slopes and the intercept.
Preferably, if the slopes of two adjacent lines are not consistent, taking the average value of the two slopes as a new slope of the two adjacent lines;
and obtaining the line width according to the new slope and the intercept.
Preferably, the positioning of all lines on the correction map to obtain line widths corresponding to all adjacent two lines includes:
and inputting the correction chart into a pre-established network model, and outputting the line width corresponding to two adjacent lines.
The application provides a smear measuring device, includes:
the test image acquisition module is used for acquiring a test image acquired by the camera device;
the single-channel image acquisition module is used for converting the test image into an XYZ space and acquiring a single-channel image by utilizing Y-channel data;
the correction map obtaining module is used for correcting by using a preset gamma value according to the single-channel image to obtain a correction map;
and the line width determining module is used for positioning all lines of the correction graph to obtain the line widths corresponding to all the adjacent two lines.
Preferably, the method further comprises the following steps:
and the camera device correction module is used for sequentially carrying out distortion correction, flat field correction and position correction on the camera device.
The application provides an electronic device, including:
a memory for storing a computer program;
a processor for implementing the steps of the smear measurement method as described above when executing the computer program.
The present application provides a computer readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the smear measurement method as described above.
The application provides a smear measurement method, which comprises the following steps: acquiring a test image acquired by a camera device; converting the test image into an XYZ space, and acquiring a single-channel image by using Y-channel data; correcting by using a preset gamma value according to the single-channel image to obtain a correction image; and positioning all lines of the correction graph to obtain the line widths corresponding to the two adjacent lines.
It is thus clear that this application passes through camera device collection test image to Y channel data in the XYZ space that corresponds according to test image obtains single channel image promptly luminance image, because people's eye experience is not linear with luminance, consequently adopts preset gamma numerical value to rectify, realizes and feels unanimous with people's eye, then confirms the linewidth again according to the correction map, has avoided the problem that the measurement that correlation technique adopted the manual work to carry out the smear causes is inefficient.
The application also provides a smear measuring device, an electronic device and a computer readable storage medium, all having the above beneficial effects, which are not repeated herein.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a smear measurement system according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a smear measurement method according to an embodiment of the present disclosure;
fig. 3 is a schematic view of a line width of a dot image according to an embodiment of the present disclosure;
fig. 4 is a schematic flow chart of line width determination provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a smear measuring apparatus according to an embodiment of the present disclosure;
fig. 6 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art without any inventive step based on the embodiments in the present application are within the scope of protection of the present application.
The general smear measurement method is to play a test chart and then manually measure with a ruler, which has two directions of horizontal and vertical, generally 3-6 mm. The measuring method comprises the following steps: and adjusting the projection size to 80 inches, playing a test chart, and finding out a minimum scale capable of covering the line width, wherein the corresponding reading of the scale is flare. But it is inefficient to use manual measurements.
The embodiment provides a smear measuring system, which can improve smear measuring efficiency. Referring to fig. 1, fig. 1 is a schematic structural diagram of a smear measurement system according to an embodiment of the present disclosure.
The smear measurement system of the present application includes: an electronic apparatus 101 and an imaging device 102.
The electronic device 101 may include a processor, a memory, and the like, and may be communicatively connected to the camera 102 through a communication interface by using a communication network to realize data interaction. The electronic equipment 101 acquires a test image acquired by the camera device 102; converting the test image into an XYZ space, and acquiring a single-channel image by using Y-channel data; correcting by using a preset gamma value according to the single-channel image to obtain a correction image; and positioning all lines of the correction graph to obtain the line widths corresponding to the two adjacent lines.
The camera device 102 provides an input interface for acquiring instructions and a trigger unit for acquiring instructions for a user on a user interaction interface. Various displays and reminder information may also be included in the user interface. When the acquisition instruction is triggered by the outside, the camera device 102 acquires a test image; the camera 102 may transmit the test image to the electronic apparatus 101 using a communication network. It should be noted that the communication network of the present application may be determined according to a network condition and an application requirement in an actual application process, and may be a wireless communication network, such as a mobile communication network or a WIFI network, or a wired communication network, or a wide area network, or a local area network when a situation allows, which is not limited herein.
The present embodiment provides a smear measurement method with high measurement efficiency, and specifically please refer to fig. 2, where fig. 2 is a flowchart of the smear measurement method provided in the present embodiment, and the method specifically includes:
s101, acquiring a test image acquired by a camera device;
the smear targeted by the present embodiment may be a projector smear, a computer smear, or a television smear.
The present embodiment does not limit the imaging device, and may be one of a wide-angle camera, a super wide-angle camera, and a normal camera. When the projector is used, projecting a test image onto a projection curtain or a projection wall, and acquiring the test image by using a camera device; when the computer or the television is used, the test image is displayed on the screen and then is collected by the camera device. The test image is generally a grid image, and may also be a dot image, and this embodiment does not limit various sizes in the grid, and the user may set the test image according to actual requirements as long as the purpose of this embodiment can be achieved.
It is understood that the difference from the image perceived by the human eye is mainly due to the difference caused by the image pickup apparatus on the one hand, and the difference between the image viewed by the human eye and the image actually captured by the image pickup apparatus on the other hand, is mainly due to the gamma characteristic of the human eye. Therefore, the test image in this embodiment is an unprocessed image, and it can be understood that the raw image is obtained by taking a picture, and the raw image is an unprocessed image directly obtained by the camera sensor, and a corresponding interface is provided for obtaining the raw image. Generally, the processed images output by the cameras use the rgb color space, which is a device-dependent color space, that is, the same rgb values output by the two cameras are not necessarily the same color, or the same image is displayed by two displays, and the colors also look different, so the embodiment converts the obtained unprocessed test image into the XYZ space, which is a device-independent color space.
Further, in order to improve the accuracy of smear measurement, the error that this embodiment caused because camera device through camera calibration solution, specifically, before obtaining the test image that camera device gathered, still include: distortion correction, flat field correction, and position correction are sequentially performed on the imaging device.
Further elaboration is directed to distortion correction. The image distortion is caused by lens parameters, for example, the original image is square, and the obtained image is circular. In this embodiment, the distortion correction may specifically be assisted correction based on a checkerboard, a checkerboard image is displayed and collected to obtain a distorted checkerboard image, a mapping relationship is obtained through a distortion model, and a relationship between a real checkerboard image imgR and a distorted checkerboard image imgD is as follows: imgR (U, V) ═ imgD (Ud, Vd). From this relationship, all imgRs (U, V) are found. Of course, other ways are also possible, please refer to the related art, and the description of this embodiment is not repeated. After the distortion correction is adopted, the image is not distorted, and the accuracy of smear measurement is improved.
Further elaboration is directed to flat field correction. Ideally, when the image capturing device images a uniform target, the luminance values of all the pixels in the obtained image should be theoretically the same. However, in practice, the brightness values of the pixels in the image often have large differences, and this characteristic reduces the accuracy of smear measurement. The flat field correction method may be a two-point correction method or a modified two-point correction method, but may be other methods as long as the object of the present embodiment can be achieved. The two-point correction method is based on the premise that the detector pixels are linear in response. Firstly, carrying out primary exposure on a dark field by a camera device to obtain the offset of each pixel; then, carrying out primary imaging on the gray-scale uniform object under the uniform illumination condition to obtain a uniform field image, wherein all points in the image can be close to the maximum gray value preferably; and finally, subtracting the dark field image from the uniform light field image, and correcting the image gain by using a relative calibration method. This embodiment is not described in detail. After flat field correction is adopted, the brightness values of the pixel points in the obtained image are all real brightness values, and no deviation exists.
Further elaboration is made with respect to position correction. The position correction in this embodiment is mainly because the size of the pixel point of the image pickup device needs to be corresponding to the actual size of the picture, for example, how many mm the pixel of 1 image pickup device corresponds to the actual size. The calibration method is simple: the camera device is kept parallel to the wall surface, an object with a known size, such as a calibration plate or a steel ruler, is placed on the wall surface in the visual field of the camera device, and the pixel size can be obtained by dividing the actual size by the number of pixels of the calibration object.
Therefore, the errors caused by the camera device can be reduced by sequentially carrying out distortion correction, flat field correction and position correction on the camera device, and the accuracy of smear measurement is improved.
S102, converting the test image into an XYZ space, and acquiring a single-channel image by using Y-channel data;
the unprocessed raw format test image is converted to XYZ space. The XYZ space is a color space irrelevant to the device, only the Y-channel data is reserved, and the Y-channel data is converted into a single-channel image. The Y-channel data is brightness, and the brightness is different from the gray scale.
S103, correcting by using a preset gamma value according to the single-channel image to obtain a correction image;
the purpose of this step is to convert the captured test image into an image that is consistent with the human eye's perception for the purpose of human eye correction. Since the human eye has gamma characteristics, that is, the relationship between human eye perception and brightness is not linear, but the data obtained by the image pickup device is linear, a measurement error is finally caused.
In this embodiment, the preset gamma value is selected to be a human eye gamma value of 2.2gamma or a value close to the human eye gamma value. The formula can thus be used: output value being input valuegammaAnd the brightness value of each pixel point in the single-channel image is changed into a corresponding value taking 1/2.2 as an index, so that the picture correction is completed, and the consistency with the human eye feeling is realized.
And S104, positioning all lines of the correction graph to obtain line widths corresponding to all adjacent two lines.
The purpose of this embodiment is to obtain the line widths corresponding to all lines. It can be understood that, when the test image is a grid image, the line width of the obtained line refers to the line width of the grid line; when the test image is a dot image, the line width of the obtained line refers to the adjacent line width of a straight line formed by connecting corresponding points in dots in each column or each row, please refer to fig. 3, where fig. 3 is a partial line width schematic diagram of a dot image according to an embodiment of the present disclosure. When positioning is carried out, the line width can be automatically output in a network model-based mode, two lines can be determined based on the difference value of pixel points, and certainly, a linear formula can be simulated.
Based on the technical scheme, the test image is collected through the camera device, the single-channel image, namely the brightness image, is obtained according to the Y channel data in the XYZ space corresponding to the test image, due to the fact that human eyes feel not linear with brightness, the preset gamma value is adopted for correction, the human eyes feel the same, then the line width is determined according to the correction image, and the problem of low efficiency caused by manual smear measurement in the related art is solved.
In an implementation manner, in order to improve the accuracy of line width determination, this embodiment provides a specific method for determining a line width, please refer to fig. 4, where fig. 4 is a schematic flow chart of line width determination provided in this embodiment, and the method includes:
s1041, when the test image is a grid test image, acquiring rectangular areas corresponding to two adjacent black squares respectively from the correction image, wherein the rectangular areas comprise lines;
the grid test image in this embodiment may include a plurality of black squares and corresponding lines. The purpose of this embodiment is to obtain the line widths of all lines. Firstly, all black squares can be obtained, two adjacent squares in the horizontal direction or the vertical direction are found, and then an edge area, namely a rectangular area including lines, is intercepted according to the black squares obtained through positioning.
S1042, obtaining centroids of the two rectangular areas;
and calculating the centroids of the two rectangular areas, wherein the calculation formula of the centroids is as follows: dt1 ═ Σ (Im g (i +1) -Im g (i)), dt ═ Σ (Im g (i +1) -Im g (i) × i), centroid position ═ dt/dt 1; where i denotes the several pixels, Img (i) denotes the luminance value of the ith pixel, and Img (i +1) denotes the luminance value of the (i +1) th pixel.
S1043, performing linear fitting according to all centroids of each row or each column to obtain line information of the line;
the purpose of this step is to perform linear fitting on the centroid of each row/column to obtain accurate positioning of the line edge, that is, to obtain line information of the line. Wherein the line information includes a line formula, a slope, an intercept, and a constant for the line.
Further, the slopes of the two edges should be consistent, a slight difference may be generated in actual calculation, if the slopes are not equal, the slope may be changed to be consistent manually, the value is an average value of the two slopes, specifically, linear fitting is performed according to all centroid of each row or each column to obtain line information of the line, including:
performing linear fitting on all centroids of each row or each column to obtain a slope and an intercept;
judging whether the slopes of two adjacent lines are consistent;
and if the slopes of the two adjacent lines are consistent, obtaining the line width according to the slope and the intercept.
Specifically, taking the horizontal direction as an example, after all moment center points are obtained, a least square method is used for fitting to obtain a slope and an intercept formula;
where x (i) is the x coordinate of the ith point, y (i) is the y coordinate of the ith point, len is the number of points, and A is the intercept. B is the slope. And obtaining line information of the two lines, obtaining a corresponding linear equation, and obtaining the line width according to the linear equation. The obtained line width unit is a pixel, and the line width unit is converted into an actual unit according to the previously calibrated pixel size.
In an implementation manner, if the slopes of two adjacent lines are not consistent, the step of performing linear fitting on all centroids of each row or each column is performed again to obtain slopes and intercepts until the slopes and the intercepts are consistent, or the error is within a preset range, and then the slopes and the intercepts of the corresponding lines are averaged.
In another realizable embodiment, if the slopes of two adjacent lines are not consistent, taking the average value of the two slopes as the new slope of the two adjacent lines; and obtaining the line width according to the new slope and the intercept.
And S1044, acquiring the line width according to the information of the two adjacent lines.
Therefore, the problem of low efficiency caused by manual measurement in the related art can be solved by obtaining the line width in a linear fitting manner in the embodiment.
In another embodiment, to improve the measurement efficiency, specifically, the positioning of all lines on the calibration graph is performed to obtain the line widths corresponding to all adjacent two lines, including:
and inputting the correction chart into a pre-established network model, and outputting the line widths corresponding to two adjacent lines.
The present embodiment does not limit the network model as long as the object of the present embodiment can be achieved. Specifically, inputting a training diagram corresponding to a label into a preset model, then performing image training to obtain a network model, inputting a correction diagram into the network model, and outputting the line width. The efficiency of measurement is greatly improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a smear measuring apparatus provided in an embodiment of the present application, which includes:
a test image obtaining module 501, configured to obtain a test image collected by the camera device;
a single-channel image obtaining module 502, configured to convert the test image into XYZ space, and obtain a single-channel image using Y-channel data;
a correction map obtaining module 503, configured to perform correction by using a preset gamma value according to the single-channel image to obtain a correction map;
the line width determining module 504 is configured to perform positioning on all lines of the calibration graph to obtain line widths corresponding to all adjacent two lines.
Preferably, the method further comprises the following steps:
and the camera device correction module is used for sequentially carrying out distortion correction, flat field correction and position correction on the camera device.
Preferably, the line width determining module 504 includes:
the rectangular area selection unit is used for acquiring rectangular areas corresponding to two adjacent black squares respectively from the correction map when the test image is a grid test image, and the rectangular areas comprise lines;
the centroid determining unit is used for acquiring centroids of the two rectangular areas;
the fitting unit is used for performing linear fitting according to all centroids of each row or each column to obtain line information of the line;
and the line width determining unit is used for acquiring the line width according to the information of the two adjacent lines.
Preferably, the fitting unit includes:
the fitting subunit is used for performing linear fitting on all centroids of each row or each column to obtain a slope and an intercept;
the judging subunit is used for judging whether the slopes of the two adjacent lines are consistent;
and the first line width acquisition subunit is used for acquiring the line width according to the slope and the intercept if the slopes of the two adjacent lines are consistent.
Preferably, the fitting unit further includes:
the new slope determining subunit is used for taking the average value of the two slopes as the new slope of the two adjacent lines if the slopes of the two adjacent lines are inconsistent;
and the second line width acquisition subunit is used for obtaining the line width according to the new slope and the intercept.
Preferably, the line width determining module 504 includes:
and the line width determining unit is used for inputting the correction chart into a pre-established network model and outputting the line widths corresponding to the two adjacent lines.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
Referring to fig. 6, fig. 6 is a structural diagram of an electronic device according to an embodiment of the present disclosure, where the electronic device described below and the method described above are referred to correspondingly, and the structural diagram includes:
a memory 601 for storing a computer program;
the processor 602, when executing the computer program, may implement the steps provided by the above embodiments.
Specifically, the memory 601 includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions, and the internal memory provides an environment for the operating system and the computer-readable instructions in the non-volatile storage medium to run. The processor 602 provides the computing and control capabilities for the electronic device, and when executing the computer program stored in the memory 601, the following steps can be implemented: acquiring a test image acquired by a camera device; converting the test image into an XYZ space, and acquiring a single-channel image by using Y-channel data; correcting by using a preset gamma value according to the single-channel image to obtain a correction image; and positioning all lines of the correction graph to obtain the line widths corresponding to the two adjacent lines.
Since the embodiment of the electronic device portion and the embodiment of the method portion correspond to each other, please refer to the description of the embodiment of the method portion for the embodiment of the electronic device portion, which is not repeated here.
In another implementable embodiment, the electronic device can include: memory 601, processor 602, input output interface 603, network port 604.
The memory 601 includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions, and the internal memory provides an environment for the operating system and the computer-readable instructions in the non-volatile storage medium to run. The Processor 602 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The processor 602 provides the computing and control capabilities for the electronic device, executes the computer program stored in the memory 601, and may implement the steps of the smear measurement method. The input/output interface 603 is used for acquiring computer programs, parameters and instructions imported from the outside, and storing the computer programs, parameters and instructions into the memory 601 under the control of the processor 602. The input/output interface 603 may be connected to an input device for receiving parameters or instructions manually input by a user. The input device may be a touch screen, or may be a keyboard, a touch pad, a mouse, or the like. The user may initiate the smear measurement method through the input output interface 603. And a network port 604 for performing communication connection with each external terminal device. The communication technology used for the communication connection may be a wired communication technology or a wireless communication technology, such as a mobile high definition link (MHL) technology, a Universal Serial Bus (USB), a High Definition Multimedia Interface (HDMI), a wireless fidelity (WiFi), a bluetooth communication technology, a low power consumption bluetooth communication technology, a communication technology in accordance with ieee802.11s, and the like. Specifically, in this embodiment, in the case of normal networking, authentication may be implemented through interaction with the client device through the network port 604.
In the following, a computer-readable storage medium provided by an embodiment of the present application is described, and the computer-readable storage medium described below and the method described above are referred to correspondingly,
the present embodiment provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the above-mentioned smear measurement method.
The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk. The storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of: acquiring a test image acquired by a camera device; converting the test image into an XYZ space, and acquiring a single-channel image by using Y-channel data; correcting by using a preset gamma value according to the single-channel image to obtain a correction image; and positioning all lines of the correction graph to obtain the line widths corresponding to the two adjacent lines.
Since the embodiment of the computer-readable storage medium portion and the embodiment of the method portion correspond to each other, please refer to the description of the embodiment of the method portion for the embodiment of the computer-readable storage medium portion, which is not repeated here.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
A smear measuring method, a smear measuring apparatus, an electronic device, and a computer-readable storage medium provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
Claims (10)
1. A smear measurement method, comprising:
acquiring a test image acquired by a camera device;
converting the test image into an XYZ space, and acquiring a single-channel image by using Y-channel data;
correcting by using a preset gamma value according to the single-channel image to obtain a correction image;
and positioning all lines of the correction graph to obtain the line widths corresponding to all adjacent two lines.
2. The smear measurement method according to claim 1, further comprising, before the obtaining of the test image collected by the camera device:
and sequentially carrying out distortion correction, flat field correction and position correction on the camera device.
3. The smear measurement method according to claim 1, wherein the positioning of all lines on the correction map to obtain the line widths corresponding to all adjacent two lines comprises:
when the test image is a grid test image, acquiring rectangular areas corresponding to two adjacent black squares from the correction image, wherein the rectangular areas comprise the lines;
obtaining the centroids of the two rectangular areas;
performing linear fitting according to all the centroids of each row or each column to obtain line information of the line;
and acquiring the line width according to the information of two adjacent lines.
4. The smear measurement method of claim 3, wherein the linear fitting according to all the centroids of each row or each column to obtain the line information of the line comprises:
performing linear fitting on all the centroids of each row or each column to obtain a slope and an intercept;
judging whether the slopes of two adjacent lines are consistent;
and if the slopes of two adjacent lines are consistent, obtaining the line width according to the slopes and the intercept.
5. The smear measurement method according to claim 4, wherein if the slopes of two adjacent lines are not consistent, the average of the two slopes is used as a new slope of the two adjacent lines;
and obtaining the line width according to the new slope and the intercept.
6. The smear measurement method according to claim 1, wherein the positioning of all lines on the correction map to obtain the line widths corresponding to all adjacent two lines comprises:
and inputting the correction chart into a pre-established network model, and outputting the line width corresponding to two adjacent lines.
7. A smear measurement apparatus, comprising:
the test image acquisition module is used for acquiring a test image acquired by the camera device;
the single-channel image acquisition module is used for converting the test image into an XYZ space and acquiring a single-channel image by utilizing Y-channel data;
the correction map obtaining module is used for correcting by using a preset gamma value according to the single-channel image to obtain a correction map;
and the line width determining module is used for positioning all lines of the correction graph to obtain the line widths corresponding to all the adjacent two lines.
8. The smear measurement apparatus of claim 7, further comprising:
and the camera device correction module is used for sequentially carrying out distortion correction, flat field correction and position correction on the camera device.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the smear measurement method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the smear measurement method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010783316.8A CN114071099B (en) | 2020-08-06 | 2020-08-06 | Smear measurement method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010783316.8A CN114071099B (en) | 2020-08-06 | 2020-08-06 | Smear measurement method and device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114071099A true CN114071099A (en) | 2022-02-18 |
CN114071099B CN114071099B (en) | 2023-05-16 |
Family
ID=80232535
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010783316.8A Active CN114071099B (en) | 2020-08-06 | 2020-08-06 | Smear measurement method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114071099B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000350032A (en) * | 1999-06-08 | 2000-12-15 | Canon Inc | Image reading method and device and storage medium |
US20030210412A1 (en) * | 2002-03-25 | 2003-11-13 | Hitoshi Ishibashi | Misalignment correction pattern formation method, misalignment correction method, and color image formation apparatus |
KR100810344B1 (en) * | 2006-10-10 | 2008-03-04 | 삼성전자주식회사 | Apparatus for digital photographing and method for smear appearance correction and detecting using the same |
CN101478692A (en) * | 2008-12-25 | 2009-07-08 | 昆山锐芯微电子有限公司 | Test method and system for image sensor dynamic resolution |
CN102509531A (en) * | 2011-11-21 | 2012-06-20 | 深圳市华星光电技术有限公司 | Method and device for measuring streaks of display device |
US20140168665A1 (en) * | 2012-12-14 | 2014-06-19 | Canon Kabushiki Kaisha | Image forming apparatus |
CN108108293A (en) * | 2017-12-28 | 2018-06-01 | 北京牡丹视源电子有限责任公司 | A kind of method and system for testing hangover time |
TW201934975A (en) * | 2017-12-03 | 2019-09-01 | 以色列商鲁姆斯有限公司 | Optical device testing method and apparatus |
CN209899325U (en) * | 2019-02-27 | 2020-01-07 | 西安道志智能机器人有限公司 | Resolution measuring plate for medical endoscope detector |
-
2020
- 2020-08-06 CN CN202010783316.8A patent/CN114071099B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000350032A (en) * | 1999-06-08 | 2000-12-15 | Canon Inc | Image reading method and device and storage medium |
US20030210412A1 (en) * | 2002-03-25 | 2003-11-13 | Hitoshi Ishibashi | Misalignment correction pattern formation method, misalignment correction method, and color image formation apparatus |
KR100810344B1 (en) * | 2006-10-10 | 2008-03-04 | 삼성전자주식회사 | Apparatus for digital photographing and method for smear appearance correction and detecting using the same |
CN101478692A (en) * | 2008-12-25 | 2009-07-08 | 昆山锐芯微电子有限公司 | Test method and system for image sensor dynamic resolution |
CN102509531A (en) * | 2011-11-21 | 2012-06-20 | 深圳市华星光电技术有限公司 | Method and device for measuring streaks of display device |
US20140168665A1 (en) * | 2012-12-14 | 2014-06-19 | Canon Kabushiki Kaisha | Image forming apparatus |
TW201934975A (en) * | 2017-12-03 | 2019-09-01 | 以色列商鲁姆斯有限公司 | Optical device testing method and apparatus |
CN108108293A (en) * | 2017-12-28 | 2018-06-01 | 北京牡丹视源电子有限责任公司 | A kind of method and system for testing hangover time |
CN209899325U (en) * | 2019-02-27 | 2020-01-07 | 西安道志智能机器人有限公司 | Resolution measuring plate for medical endoscope detector |
Non-Patent Citations (1)
Title |
---|
王志军;肖欢畅;吴简: "高速成像拖尾畸变校正方法研究" * |
Also Published As
Publication number | Publication date |
---|---|
CN114071099B (en) | 2023-05-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10554880B2 (en) | Image processing system, imaging apparatus, image processing method, and computer-readable storage medium | |
WO2022179109A1 (en) | Projection correction method and apparatus, storage medium and electronic device | |
KR101917404B1 (en) | Colour calibration method for an image capture device | |
CN111862224B (en) | Method and device for determining external parameters between camera and laser radar | |
KR101941801B1 (en) | Image processing method and device for led display screen | |
JP7255718B2 (en) | Information processing device, recognition support method, and computer program | |
CN111083458B (en) | Brightness correction method, system, equipment and computer readable storage medium | |
CN111935465A (en) | Projection system, projection device and correction method of display image thereof | |
CN117378196A (en) | Image correction method and shooting device | |
CN109785390B (en) | Method and device for image correction | |
WO2020093653A1 (en) | Color adjustment method, color adjustment device, electronic device and computer-readable storage medium | |
CN114302121A (en) | Image correction inspection method, device, electronic equipment and storage medium | |
JP2015204004A (en) | Image formation device, calibration program and calibration system | |
US20230169688A1 (en) | Image correction apparatus, image correction method, program, and recording medium | |
CN114071099B (en) | Smear measurement method and device, electronic equipment and readable storage medium | |
JP2012042804A (en) | Image processing apparatus and method | |
CN110300291B (en) | Apparatus and method for determining color value, digital camera, application, and computer device | |
US11375084B2 (en) | Measurement method for measuring a physical property value of light output of a display device | |
US9041815B2 (en) | Digital camera imaging evaluation module | |
JP6307843B2 (en) | Interpolation method, program, and interpolation apparatus | |
WO2022059342A1 (en) | Image processing device, image processing method, program, and recording medium | |
CN115616787A (en) | Screen display calibration assistance method and computer-readable storage medium | |
TW202232936A (en) | Resolution measurement method, resolution measurement system, and program | |
KR100833346B1 (en) | Method of measuring the pixel width of character image on display | |
JP2020120206A (en) | Color conversion method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |