CN113240630B - Speckle image quality evaluation method and device, terminal equipment and readable storage medium - Google Patents

Speckle image quality evaluation method and device, terminal equipment and readable storage medium Download PDF

Info

Publication number
CN113240630B
CN113240630B CN202110415660.6A CN202110415660A CN113240630B CN 113240630 B CN113240630 B CN 113240630B CN 202110415660 A CN202110415660 A CN 202110415660A CN 113240630 B CN113240630 B CN 113240630B
Authority
CN
China
Prior art keywords
target
speckle image
image
determining
speckles
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.)
Active
Application number
CN202110415660.6A
Other languages
Chinese (zh)
Other versions
CN113240630A (en
Inventor
黄若普
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Angstrong Technology Co ltd
Original Assignee
Shenzhen Angstrong Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Angstrong Technology Co ltd filed Critical Shenzhen Angstrong Technology Co ltd
Priority to CN202110415660.6A priority Critical patent/CN113240630B/en
Publication of CN113240630A publication Critical patent/CN113240630A/en
Application granted granted Critical
Publication of CN113240630B publication Critical patent/CN113240630B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Image Processing (AREA)

Abstract

The application is applicable to the technical field of cameras, and particularly relates to a speckle image quality evaluation method and device, terminal equipment and a computer-readable storage medium. The speckle image quality evaluation method can acquire the target speckle image, and determine the target gray scale and the image definition of the target speckle image and the total number and the total area of the effective speckles in the target speckle image, so that the quality evaluation result of the target speckle image can be determined according to the target gray scale and the image definition and the total number and the total area of the effective speckles. The method and the device can simply, quickly and accurately determine the quality evaluation result of the target speckle image under the condition of not calculating the speckle depth.

Description

Speckle image quality evaluation method and device, terminal equipment and readable storage medium
Technical Field
The application belongs to the technical field of cameras, and particularly relates to a speckle image quality evaluation method and device, terminal equipment and a computer-readable storage medium.
Background
The working principle of the structured light depth camera is that speckles of specific patterns are projected by a projector, an infrared camera collects speckle images, and then the speckle images are matched with reference images to obtain depth images. That is, the quality of the speckle image will directly affect the accuracy of the depth calculation, and thus the accuracy of the depth image acquired by the structured light depth camera. Therefore, how to simply and accurately evaluate the quality of the speckle image becomes an urgent problem to be solved in the field.
Disclosure of Invention
The embodiment of the application provides a speckle image quality evaluation method, a device, terminal equipment and a computer readable storage medium, which can simply and accurately determine the quality of a speckle image and improve the accuracy of determining the quality of the speckle image.
In a first aspect, an embodiment of the present application provides a speckle image quality assessment method, which may include:
acquiring a target speckle image;
determining the target gray scale of the target speckle image, determining the image definition of the target speckle image, and determining the total number and the total area of effective speckles in the target speckle image;
and determining the quality evaluation result of the target speckle image according to the target gray level, the image definition, the total number and the total area of the effective speckles.
By the speckle image quality evaluation method, the terminal equipment can acquire the target speckle image and determine the target gray scale and the image definition of the target speckle image and the total number and the total area of the effective speckles in the target speckle image, so that the quality evaluation result of the target speckle image is determined according to the target gray scale and the image definition and the total number and the total area of the effective speckles. The method and the device can simply, quickly and accurately determine the quality evaluation result of the target speckle image without calculating the speckle depth, and have strong usability and practicability.
For example, the determining the target gray scale of the target speckle image may include:
acquiring a gray level histogram of the target speckle image;
and determining the target gray scale of the target speckle image according to the gray scale histogram.
Specifically, the determining the target gray level of the target speckle image according to the gray level histogram may include:
determining the median of gray distribution in the target speckle image according to the number of pixel points corresponding to each gray in the gray histogram;
and determining the median as the target gray scale of the target speckle image.
For example, the determining the image sharpness of the target speckle image may include:
calculating a first gradient and a second gradient of each preset pixel point, wherein each preset pixel point is a pixel point in a preset area in the target speckle image, the first gradient is the gradient of the preset pixel point in the x-axis direction, and the second gradient is the gradient of the preset pixel point in the y-axis direction;
and determining the image definition of the target speckle image according to the first gradient and the second gradient of each preset pixel point.
Specifically, the preset areas are a central area and an edge area of the target speckle image.
For example, the determining the total number and the total area of the effective speckles in the target speckle image may include:
carrying out binarization processing on the target speckle image to obtain a binarized image;
determining each connected region in the binary image and the region area of each connected region;
acquiring a target communication region with the region area larger than or equal to a first area threshold value and smaller than or equal to a second area threshold value;
and determining the target connected regions as the effective speckles, and determining the total number and the total area of the effective speckles according to the number and the region areas of the target connected regions.
Specifically, the determining a quality evaluation result of the target speckle image according to the target gray scale, the image sharpness, and the total number and total area of the effective speckles may include:
calculating the quality evaluation result of the target speckle image according to the following formula:
Qua=α*G+β*B+ε*A+δ*N;
Figure BDA0003025237990000031
qua is the quality evaluation result of the target speckle image, G is the target gray level, alpha is the weight coefficient corresponding to the target gray level, B is the image definition, beta is the weight coefficient corresponding to the image definition, A1Is the total area of the effective speckles, A2Is the total area of effective speckles in the standard speckle image corresponding to the target speckle image, and epsilon isWeight coefficient, N, corresponding to the total area of the effective speckles1For the total number of effective speckles, N2And delta is a weight coefficient corresponding to the total number of the effective speckles in the standard speckle image corresponding to the target speckle image.
In a second aspect, an embodiment of the present application provides a speckle image quality evaluation apparatus, including:
the image acquisition module is used for acquiring a target speckle image;
the speckle determination module is used for determining the target gray scale of the target speckle image, determining the image definition of the target speckle image and determining the total number and the total area of the effective speckles in the target speckle image;
and the quality evaluation module is used for determining the quality evaluation result of the target speckle image according to the target gray level, the image definition, the total number and the total area of the effective speckles.
In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the speckle image quality assessment method according to any one of the above first aspects when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the speckle image quality assessment method according to any one of the first aspect.
In a fifth aspect, the present application provides a computer program product, which when run on a terminal device, causes the terminal device to execute the speckle image quality assessment method according to any one of the above first aspects.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1a is an exemplary illustration of speckle image overexposure;
FIG. 1b is an example diagram of a speckle image being too dark;
FIG. 2 is an exemplary illustration of a blurred speckle image;
FIG. 3 is a schematic structural diagram of a speckle image quality evaluation system provided by an embodiment of the present application;
FIG. 4 is a schematic flow chart diagram of a speckle image quality assessment method provided by an embodiment of the present application;
FIG. 5 is a diagram illustrating an example of a gray histogram provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a speckle image quality evaluation apparatus provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing a relative importance or importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The working principle of the structured light depth camera is that speckles of specific patterns are projected by a projector, an infrared camera collects speckle images, and then the speckle images are matched with reference images to obtain a depth map. That is, the quality of the speckle image projected by the projector will directly affect the accuracy of the depth calculation, and thus the accuracy of the depth image acquired by the structured light depth camera. For example, as shown in fig. 1a, if the speckle image is over-exposed, or as shown in fig. 1b, if the speckle image is too dark, the matching of the speckle image is affected, and the accuracy of the depth calculation is affected, so that the accuracy of the depth image acquired by the structured light depth camera is affected. For example, as shown in fig. 2, if the speckle image is blurred (e.g., if the projector is squeezed or the lens is contaminated when being installed, the speckle image is blurred), the matching of the speckle image is also affected, and the accuracy of the depth calculation is affected, so that the accuracy of the depth image acquired by the structured light depth camera is affected. Therefore, how to simply and accurately evaluate the quality of the speckle image becomes an urgent problem to be solved in the field.
In order to solve the above problem, an embodiment of the present application provides a method for evaluating the quality of a speckle image, which may acquire a target speckle image, and may determine a target gray level and an image definition of the target speckle image, and a total number and a total area of effective speckles in the target speckle image, so that a quality evaluation result of the target speckle image may be determined according to the target gray level, the image definition, and the total number and the total area of the effective speckles. The method and the device can simply, quickly and accurately determine the quality evaluation result of the speckle image without calculating the depth of the speckle image, and have strong usability and practicability.
The speckle image quality evaluation method provided by the embodiment of the application can be applied to terminal devices such as a mobile phone, a tablet personal computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, a super-mobile personal computer (UMPC), a netbook, and a Personal Digital Assistant (PDA), and the embodiment of the application does not limit the specific type of the terminal device.
It can be understood that the speckle image quality evaluation method provided by the embodiment of the present application can be applied to a scene in which the structured light depth camera acquires a depth image, that is, before the structured light depth camera acquires a depth image according to a speckle image and a reference image, the terminal device can acquire a speckle image with good quality according to the speckle image quality evaluation method provided by the embodiment of the present application, so that the depth image can be obtained according to the speckle image with good quality, and the accuracy of the depth image is improved. In addition, the speckle image quality evaluation method provided by the embodiment of the application can also be applied to screening scenes of the projector, namely in the production process of the projector, the terminal device can evaluate the quality of the speckle image projected and formed by the projector by using the speckle image quality evaluation method provided by the embodiment of the application, and can determine the quality of the projector according to the quality of the speckle image, so that a defective projector can be effectively screened.
Referring to fig. 3, fig. 3 is a schematic structural diagram illustrating a speckle image quality evaluation system according to an embodiment of the present application, applied to a scene of a screening projector. As shown in fig. 3, the speckle image quality evaluation system may include a projector 301, an infrared camera 302, a projection panel 303, and a terminal device 304 connected to the infrared camera 302. Wherein the projector 301 may be arranged side by side with the infrared camera 302, and the projection plate 303 may be arranged at a distance from the projector 301 and the infrared camera 302, for example, at a distance of 500 mm from the projector 301 and the infrared camera 302. Specifically, the projector 301 may project speckles of a specific pattern onto the projection panel 303, and at this time, the infrared camera 302 may capture the projection panel 303 to obtain a speckle image, and may send the captured speckle image to the terminal device 304. The terminal device 304 may perform quality evaluation on the received speckle images according to the speckle image quality evaluation method provided in the embodiment of the present application, to obtain a quality evaluation result.
Referring to fig. 4, fig. 4 shows a schematic flowchart of a speckle image quality evaluation method provided by an embodiment of the present application. As shown in fig. 4, the speckle image quality evaluation method may include:
s401, acquiring a target speckle image.
The target speckle image may be a speckle image acquired by an infrared camera in the structured light depth camera, or may be a speckle image acquired by the infrared camera 302 in fig. 3. It is to be understood that the target speckle image may be a grayscale image.
S402, determining the target gray scale of the target speckle image, determining the image definition of the target speckle image, and determining the total number and the total area of the effective speckles in the target speckle image.
In the embodiment of the application, the terminal device may obtain the gray level histogram of the target speckle image, and may determine the target gray level of the target speckle image according to the gray level histogram. The gray level histogram is obtained by grouping the gray levels in [0, 255], and then performing statistics according to the gray levels of the pixel points in the target speckle image.
In one possible implementation, as shown in fig. 5, the gray histogram may be a histogram obtained in the order of gray from 0 to 255. Alternatively, the gradation histogram may be a histogram obtained in the order of the gradations from 255 to 0. For example, the terminal device may determine a median of gray level distribution in the target speckle image according to the number of pixel points corresponding to each gray level in the gray level histogram, and determine the median as the target gray level of the target speckle image. That is, the terminal device may rearrange each group in the gray histogram according to the number of pixels corresponding to each gray level to obtain a rearranged gray histogram, and may determine the median of the rearranged gray histogram as the target gray level of the target speckle image. For example, the terminal device may arrange each group in the gray level histogram in a manner of descending order of the number of pixels to obtain a rearranged gray level histogram. Or the terminal device may arrange each group in the gray level histogram in an ascending manner according to the number of the pixels, so as to obtain the rearranged gray level histogram.
It should be understood that when the gray histogram includes an odd number of groups (i.e., groups having a number of pixels other than 0), the terminal device may directly determine the gray corresponding to the group located at the middle position as the median. When the gray histogram includes an even number of groups, the terminal device may determine an average value of gray scales corresponding to two groups located at the middle position as the median. For example, when the grayscale histogram includes 101 bins, the terminal device may determine, as the median, a grayscale corresponding to a 51 st bin in the rearranged grayscale histogram. For example, when the gray histogram includes 102 groups, the terminal device may determine, as the median, an average value of a gray corresponding to a 51 st group and a gray corresponding to a 52 th group in the rearranged gray histogram.
In another possible implementation manner, the terminal device may also calculate an average gray scale corresponding to the target speckle image according to the gray scale histogram, and may determine the average gray scale as the target gray scale of the target speckle image.
In the embodiment of the application, the terminal device may calculate the first gradient and the second gradient of each preset pixel point, and may determine the image sharpness of the target speckle image according to the first gradient and the second gradient of each preset pixel point. Each preset pixel point is a pixel point in a preset area in the target speckle image, the first gradient is the gradient of the preset pixel point in the x-axis direction, and the second gradient is the gradient of the preset pixel point in the y-axis direction. The preset areas can be the central area and the edge areas of four corners of the target speckle image, the image definition is calculated only according to the obvious central area and the edge areas of four corners, and the calculated amount can be reduced on the basis of ensuring the accurate calculation of the image definition. The areas of the central region and the edge region may be set according to actual conditions, which is not limited in the embodiment of the present application.
Specifically, the terminal device may determine the image sharpness of the target speckle image according to the following formula:
Figure BDA0003025237990000091
wherein B is the image clarity of the target speckle imageDegree (x)i,yi) The coordinates of the ith preset pixel point, N is the total number of the preset pixel points, Gx(xi,yi) First gradient, G, for the ith predetermined pixel pointy(xi,yi) And presetting a second gradient of the pixel point for the ith.
It is understood that the terminal device may also perform the image sharpness calculation according to the whole target speckle image. In addition, the terminal device can also calculate the image definition of the target speckle image through a Brenner gradient function or a Tenengrad gradient function and the like.
In the embodiment of the present application, the terminal device may determine the total number and the total area of the effective speckles in the target speckle image according to the following steps:
a, performing binarization processing on the target speckle image to obtain a binarized image;
b, determining each connected region in the binary image and the region area of each connected region;
step c, acquiring a target communication region with the region area larger than or equal to the first area threshold and smaller than or equal to the second area threshold;
and d, determining the target connected regions as the effective speckles, and determining the total number and the total area of the effective speckles according to the number and the area of the target connected regions.
The target speckle image is subjected to binarization processing, so that the influence of environmental illumination change on speckles can be reduced, and the speckles can be effectively extracted. In the embodiment of the present application, the effective speckle refers to a speckle whose area satisfies a preset condition. Specifically, after the binarization processing is performed on the target speckle image by the terminal device to obtain the binarized image, the connected regions of the bright blocks in the binarized image can be detected, and the region area of each connected region can be obtained, so that the effective speckles and the total number and the total area of the effective speckles can be obtained according to the region area. Specifically, the terminal device may determine a target connected component area having an area greater than or equal to a first area threshold and less than or equal to a second area threshold as an effective speckle. The first area threshold and the second area threshold may be determined according to an area of a connected region corresponding to speckles in a standard speckle image.
In this embodiment of the present application, the detection method of the connected region may be: the terminal equipment can sequentially traverse each pixel point in the binary image, and if the gray level of the pixel point is the same as that of the adjacent pixel point (including the pixel points in the upper, lower, left and right directions), the terminal equipment can mark the pixel point and the adjacent pixel point as a communicated region; if the gray level of the pixel point is different from the gray levels of all the adjacent pixel points, the terminal equipment can mark the pixel point as a new connected region until the whole binary image is traversed, and all the connected regions are obtained.
And S403, determining a quality evaluation result of the target speckle image according to the target gray scale, the image definition, the total number of the effective speckles and the total area.
Specifically, the terminal device may first obtain the total number and the total area of the effective speckles in the standard speckle image corresponding to the target speckle image, and may calculate the quality evaluation result of the target speckle image according to the following formula:
Qua=α*G+β*B+ε*A+δ*N;
Figure BDA0003025237990000101
qua is the quality evaluation result of the target speckle image, G is the target gray level, alpha is the weight coefficient corresponding to the target gray level, B is the image definition, beta is the weight coefficient corresponding to the image definition, A1Is the total area of the effective speckles, A2The total area of effective speckles in a standard speckle image corresponding to the target speckle image, epsilon is a weight coefficient corresponding to the total area of the effective speckles, N1For the total number of effective speckles, N2Effective scattering in the standard speckle image corresponding to the target speckle imageAnd the total number of the speckles is delta, and the delta is a weight coefficient corresponding to the total number of the effective speckles.
It should be noted that, when the target gray level is greater than the preset first gray level threshold, the terminal device may determine that the target speckle image is overexposed, that is, may directly determine that the target speckle image is a speckle image with unqualified quality. When the target gray level is smaller than a preset second gray level threshold value, the terminal device can determine that the target speckle image is too dark, and can also directly determine that the target speckle image is a speckle image with unqualified quality. The first gray threshold and the second gray threshold may be specifically determined according to actual conditions.
Similarly, when the image definition of the target speckle image is smaller than a preset definition threshold, the terminal device may determine that the target speckle image is a blurred speckle image, that is, may directly determine that the target speckle image is a quality-unqualified speckle image. Wherein, the definition threshold value can be specifically determined according to the actual situation. Similarly, when the total number of the effective speckles is smaller than a preset number threshold or the total area of the effective speckles is smaller than a preset area threshold, the terminal device may directly determine that the target speckle image is an unqualified speckle image. Wherein, the number threshold and the area threshold can be specifically determined according to actual conditions.
It is understood that in the screening scene of the projector, when determining that the target speckle image is an unqualified speckle image, the terminal device can directly determine that the projector is an unqualified projector. Or the terminal device may also reacquire a plurality of target speckle images, and when it is determined that the plurality of target speckle images are all the speckle images with unqualified quality, the terminal device may determine that the projector is an unqualified projector.
In the embodiment of the application, the terminal device can acquire the target speckle image and determine the target gray scale, the image definition and the total number and the total area of the effective speckles in the target speckle image, so that the quality evaluation result of the target speckle image can be determined according to the target gray scale, the image definition and the total number and the total area of the effective speckles. The method and the device can simply, quickly and accurately determine the quality evaluation result of the target speckle image without calculating the speckle depth, and have strong usability and practicability.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 6 shows a block diagram of the speckle image quality evaluating apparatus provided in the embodiment of the present application, corresponding to the speckle image quality evaluating method described in the above embodiment, and only the parts related to the embodiment of the present application are shown for convenience of explanation.
Referring to fig. 6, the speckle image quality evaluating apparatus may include:
an image acquisition module 601, configured to acquire a target speckle image;
a speckle determination module 602, configured to determine a target grayscale of the target speckle image, determine an image sharpness of the target speckle image, and determine a total number and a total area of effective speckles in the target speckle image;
and a quality evaluation module 603, configured to determine a quality evaluation result of the target speckle image according to the target gray scale, the image sharpness, and the total number and total area of the effective speckles.
For example, the speckle determination module 602 may include:
a histogram acquisition unit, configured to acquire a grayscale histogram of the target speckle image;
and the target gray level determining unit is used for determining the target gray level of the target speckle image according to the gray level histogram.
Specifically, the target gray level determination unit may include:
the median determining and dividing unit is used for determining the median of gray level distribution in the target speckle image according to the number of pixel points corresponding to each gray level in the gray level histogram;
and the target gray level determination sub-unit is used for determining the median as the target gray level of the target speckle image.
For example, the speckle determination module 602 may further include:
the gradient calculation unit is used for calculating a first gradient and a second gradient of each preset pixel point, each preset pixel point is a pixel point in a preset area in the target speckle image, the first gradient is the gradient of the preset pixel point in the x-axis direction, and the second gradient is the gradient of the preset pixel point in the y-axis direction;
and the image definition determining unit is used for determining the image definition of the target speckle image according to the first gradient and the second gradient of each preset pixel point.
Specifically, the preset areas are a central area and an edge area of the target speckle image.
For example, the speckle determination module 602 may further include:
a binarization processing unit, configured to perform binarization processing on the target speckle image to obtain a binarized image;
a connected region determining unit for determining each connected region in the binarized image and a region area of each connected region;
a target connected region acquisition unit, configured to acquire a target connected region having a region area greater than or equal to a first area threshold and less than or equal to a second area threshold;
and the effective speckle determining unit is used for determining the target connected regions as the effective speckles and determining the total number and the total area of the effective speckles according to the number and the area of the target connected regions.
Specifically, the quality evaluation module 603 is specifically configured to calculate a quality evaluation result of the target speckle image according to the following formula:
Qua=α*G+β*B+ε*A+δ*N;
Figure BDA0003025237990000131
qua is the quality evaluation result of the target speckle image, G is the target gray level, alpha is the weight coefficient corresponding to the target gray level, B is the image definition, beta is the weight coefficient corresponding to the image definition, A1Is the total area of the effective speckles, A2The total area of effective speckles in a standard speckle image corresponding to the target speckle image, epsilon is a weight coefficient corresponding to the total area of the effective speckles, N1For the total number of effective speckles, N2And delta is a weight coefficient corresponding to the total number of the effective speckles in the standard speckle image corresponding to the target speckle image.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 7, the terminal device 304 of this embodiment may include: at least one processor 70 (only one shown in fig. 7), a memory 71, and a computer program 72 stored in the memory 71 and executable on the at least one processor 70, the processor 70 implementing the steps in any of the various speckle image quality assessment method embodiments described above when executing the computer program 72.
The terminal device 304 may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal device may include, but is not limited to, a processor 70, a memory 71. Those skilled in the art will appreciate that fig. 7 is merely an example of the terminal device 304, and does not constitute a limitation of the terminal device 304, and may include more or less components than those shown, or combine some of the components, or different components, such as an input-output device, a network access device, etc.
The processor 70 may be a Central Processing Unit (CPU), and the processor 70 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 71 may in some embodiments be an internal storage unit of the terminal device 304, such as a hard disk or a memory of the terminal device 304. In other embodiments, the memory 71 may also be an external storage device of the terminal device 304, such as a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) card, a flash card (flash card), or the like provided on the terminal device 304. Further, the memory 71 may also include both an internal storage unit and an external storage device of the terminal device 304. The memory 71 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 71 may also be used to temporarily store data that has been output or is to be output.
The present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program can implement the steps in the above-mentioned embodiments of the speckle image quality assessment method.
The embodiment of the present application provides a computer program product, which when running on a terminal device, enables the terminal device to implement the steps in the foregoing speckle image quality assessment method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include at least: any entity or device capable of carrying computer program code to the apparatus/terminal device, recording medium, computer memory, read-only memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, and software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable storage media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and proprietary practices.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. 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.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (8)

1. A speckle image quality evaluation method is characterized by comprising the following steps:
acquiring a target speckle image;
determining the target gray scale of the target speckle image, determining the image definition of the target speckle image, and determining the total number and the total area of effective speckles in the target speckle image;
determining a quality evaluation result of the target speckle image according to the target gray scale, the image definition, the total number of the effective speckles and the total area;
the determining the target gray scale of the target speckle image comprises:
acquiring a gray level histogram of the target speckle image;
determining the target gray scale of the target speckle image according to the gray scale histogram; the gray level histogram is obtained by taking each gray level in [0, 255] as a group and counting the gray level of each pixel point in the target speckle image;
the determining a quality evaluation result of the target speckle image according to the target gray scale, the image definition, and the total number and the total area of the effective speckles includes:
calculating the quality evaluation result of the target speckle image according to the following formula:
Qua=α*G+β*B+ε*A+δ*N;
Figure FDA0003615478020000011
qua is the quality evaluation result of the target speckle image, G is the target gray level, alpha is the weight coefficient corresponding to the target gray level, and B is the image definitionDefinition, beta is a weight coefficient corresponding to the definition of the image, A1Is the total area of the effective speckles, A2The total area of effective speckles in a standard speckle image corresponding to the target speckle image, epsilon is a weight coefficient corresponding to the total area of the effective speckles, N1For the total number of effective speckles, N2And delta is a weight coefficient corresponding to the total number of the effective speckles in the standard speckle image corresponding to the target speckle image.
2. The speckle image quality assessment method of claim 1, wherein the determining the target grayscale of the target speckle image from the grayscale histogram, comprises:
determining the median of gray distribution in the target speckle image according to the number of pixel points corresponding to each gray in the gray histogram;
and determining the median as the target gray scale of the target speckle image.
3. The speckle image quality assessment method of claim 1, wherein the determining the image sharpness of the target speckle image comprises:
calculating a first gradient and a second gradient of each preset pixel point, wherein each preset pixel point is a pixel point in a preset area in the target speckle image, the first gradient is the gradient of the preset pixel point in the x-axis direction, and the second gradient is the gradient of the preset pixel point in the y-axis direction;
and determining the image definition of the target speckle image according to the first gradient and the second gradient of each preset pixel point.
4. The speckle image quality evaluation method of claim 3, wherein the preset regions are a central region and an edge region of the target speckle image.
5. The speckle image quality assessment method of claim 1, wherein the determining the total number and total area of effective speckles in the target speckle image comprises:
carrying out binarization processing on the target speckle image to obtain a binarized image;
determining each connected region in the binary image and the region area of each connected region;
acquiring a target communication region with the region area larger than or equal to a first area threshold value and smaller than or equal to a second area threshold value;
and determining the target connected regions as the effective speckles, and determining the total number and the total area of the effective speckles according to the number and the region area of the target connected regions.
6. A speckle image quality evaluation apparatus, comprising:
the image acquisition module is used for acquiring a target speckle image;
the speckle determination module is used for determining the target gray scale of the target speckle image, determining the image definition of the target speckle image and determining the total number and the total area of the effective speckles in the target speckle image;
the quality evaluation module is used for determining a quality evaluation result of the target speckle image according to the target gray level, the image definition, the total number and the total area of the effective speckles;
the speckle determination module comprises:
a histogram acquisition unit, configured to acquire a grayscale histogram of the target speckle image;
the target gray level determining unit is used for determining the target gray level of the target speckle image according to the gray level histogram; the gray histogram is obtained by taking each gray in [0, 255] as a group and counting the gray of each pixel point in the target speckle image;
the quality evaluation module is specifically configured to calculate a quality evaluation result of the target speckle image according to the following formula:
Qua=α*G+β*B+ε*A+δ*N;
Figure FDA0003615478020000041
qua is the quality evaluation result of the target speckle image, G is the target gray level, alpha is the weight coefficient corresponding to the target gray level, B is the image definition, beta is the weight coefficient corresponding to the image definition, A1Is the total area of the effective speckles, A2The total area of the effective speckles in the standard speckle image corresponding to the target speckle image, epsilon is a weight coefficient corresponding to the total area of the effective speckles, N1For the total number of effective speckles, N2And delta is a weight coefficient corresponding to the total number of the effective speckles in the standard speckle image corresponding to the target speckle image.
7. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the speckle image quality assessment method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the speckle image quality assessment method according to any one of claims 1 to 5.
CN202110415660.6A 2021-04-16 2021-04-16 Speckle image quality evaluation method and device, terminal equipment and readable storage medium Active CN113240630B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110415660.6A CN113240630B (en) 2021-04-16 2021-04-16 Speckle image quality evaluation method and device, terminal equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110415660.6A CN113240630B (en) 2021-04-16 2021-04-16 Speckle image quality evaluation method and device, terminal equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113240630A CN113240630A (en) 2021-08-10
CN113240630B true CN113240630B (en) 2022-07-12

Family

ID=77129721

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110415660.6A Active CN113240630B (en) 2021-04-16 2021-04-16 Speckle image quality evaluation method and device, terminal equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113240630B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113963045B (en) * 2021-10-19 2022-07-19 合肥的卢深视科技有限公司 Depth map acquisition method, structured light camera, electronic device, and storage medium
CN113965679B (en) * 2021-10-19 2022-09-23 合肥的卢深视科技有限公司 Depth map acquisition method, structured light camera, electronic device, and storage medium
CN114332014B (en) * 2021-12-29 2024-05-24 合肥瑞识智能科技有限公司 Projector quality evaluation method, projector quality evaluation device, projector quality evaluation equipment and storage medium
CN114845041B (en) * 2021-12-30 2024-03-15 齐之明光电智能科技(苏州)有限公司 Focusing method and device for nanoparticle imaging and storage medium
CN114693683B (en) * 2022-06-01 2022-10-18 合肥的卢深视科技有限公司 Depth camera anomaly detection method, electronic device and storage medium
CN115546220B (en) * 2022-12-05 2023-03-31 合肥的卢深视科技有限公司 Quality detection method and system for speckle projector, electronic device and storage medium
CN116563299B (en) * 2023-07-12 2023-09-26 之江实验室 Medical image screening method, device, electronic device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108206944A (en) * 2016-12-20 2018-06-26 浙江舜宇智能光学技术有限公司 Evaluate the method and system of the projection clarity of the diverging light formula speckle projector
CN112556994A (en) * 2020-11-27 2021-03-26 奥比中光科技集团股份有限公司 Optical information detection method, device and equipment
CN112629828A (en) * 2020-11-27 2021-04-09 奥比中光科技集团股份有限公司 Optical information detection method, device and equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6630996B2 (en) * 2000-11-15 2003-10-07 Real Time Metrology, Inc. Optical method and apparatus for inspecting large area planar objects
US6970606B2 (en) * 2002-01-16 2005-11-29 Eastman Kodak Company Automatic image quality evaluation and correction technique for digitized and thresholded document images
WO2003098522A1 (en) * 2002-05-17 2003-11-27 Pfizer Products Inc. Apparatus and method for statistical image analysis
US9116854B2 (en) * 2013-10-02 2015-08-25 National Applied Research Laboratories Method of evaluating image correlation with speckle patter
GB2532772A (en) * 2014-11-27 2016-06-01 Airbus Operations Ltd Improvements in or relating to digital image correlation systems
DE102015114376B4 (en) * 2015-08-28 2017-10-12 Visteon Global Technologies, Inc. Apparatus and method for characterizing subjective speckle formation
CN108234874B (en) * 2018-01-10 2020-07-21 南京华捷艾米软件科技有限公司 Method and device for adjusting imaging precision of somatosensory camera
WO2019205890A1 (en) * 2018-04-28 2019-10-31 Oppo广东移动通信有限公司 Image processing method, apparatus, computer-readable storage medium, and electronic device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108206944A (en) * 2016-12-20 2018-06-26 浙江舜宇智能光学技术有限公司 Evaluate the method and system of the projection clarity of the diverging light formula speckle projector
CN112556994A (en) * 2020-11-27 2021-03-26 奥比中光科技集团股份有限公司 Optical information detection method, device and equipment
CN112629828A (en) * 2020-11-27 2021-04-09 奥比中光科技集团股份有限公司 Optical information detection method, device and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于激光散斑数字图像相关的超高温变形测量方法研究;宋金连;《中国优秀博硕士学位论文全文数据库(博士) 基础科学辑》;20200615(第06期);第A005-44页 *

Also Published As

Publication number Publication date
CN113240630A (en) 2021-08-10

Similar Documents

Publication Publication Date Title
CN113240630B (en) Speckle image quality evaluation method and device, terminal equipment and readable storage medium
CN111246204B (en) Relative brightness deviation-based dirt detection method and device
CN110766679A (en) Lens contamination detection method and device and terminal equipment
CN110909712B (en) Moving object detection method and device, electronic equipment and storage medium
CN110517265B (en) Method and device for detecting surface defects of product and storage medium
CN111325717B (en) Mobile phone defect position identification method and equipment
CN111667448A (en) Image processing method, device and equipment
CN112233076B (en) Structural vibration displacement measurement method and device based on red round target image processing
CN111368587B (en) Scene detection method, device, terminal equipment and computer readable storage medium
CN114862929A (en) Three-dimensional target detection method and device, computer readable storage medium and robot
CN113781396B (en) Screen defect detection method, device, equipment and storage medium
CN111311671B (en) Workpiece measuring method and device, electronic equipment and storage medium
CN109886864B (en) Privacy mask processing method and device
CN110765875B (en) Method, equipment and device for detecting boundary of traffic target
CN111369531B (en) Image definition scoring method, device and storage device
CN115690747B (en) Vehicle blind area detection model test method and device, electronic equipment and storage medium
CN115760653B (en) Image correction method, device, equipment and readable storage medium
CN110335219B (en) Correction method and correction device for pixel distortion and terminal
CN108564571B (en) Image area selection method and terminal equipment
CN112629828B (en) Optical information detection method, device and equipment
CN112146834A (en) Method and device for measuring structural vibration displacement
CN114323585A (en) Method for calculating modulation transfer function in batch, electronic device and storage medium
CN111986144A (en) Image blur judgment method and device, terminal equipment and medium
CN112863408B (en) Screen resolution detection method and device
CN112686246B (en) License plate character segmentation method and device, storage medium and terminal equipment

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