CN116506739B - Image data enhancement method and device, electronic equipment and storage medium - Google Patents

Image data enhancement method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116506739B
CN116506739B CN202310758667.7A CN202310758667A CN116506739B CN 116506739 B CN116506739 B CN 116506739B CN 202310758667 A CN202310758667 A CN 202310758667A CN 116506739 B CN116506739 B CN 116506739B
Authority
CN
China
Prior art keywords
image
exposure time
value
reflective member
data
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
CN202310758667.7A
Other languages
Chinese (zh)
Other versions
CN116506739A (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202310758667.7A priority Critical patent/CN116506739B/en
Publication of CN116506739A publication Critical patent/CN116506739A/en
Application granted granted Critical
Publication of CN116506739B publication Critical patent/CN116506739B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/81Camera processing pipelines; Components thereof for suppressing or minimising disturbance in the image signal generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application belongs to the technical field of visual detection, and discloses a method and a device for enhancing image data, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring pixel value data and a first exposure time value of a first light reflecting member image, calculating to obtain an intermediate exposure time value according to the first exposure time value and the pixel value data, setting a plurality of exposure time values different from the intermediate exposure time value, acquiring a second light reflecting member image under the plurality of exposure time values and a third light reflecting member image under the intermediate exposure time value, obtaining a light reflecting member image dataset, deriving and fusing the light reflecting member image dataset, calculating to obtain a data enhancement image of the first light reflecting member image corresponding to the light reflecting member, deriving and fusing the light reflecting member images under different exposure time, and enhancing the data of the light reflecting member image, thereby improving the efficiency of enhancing the data of the light reflecting member image.

Description

Image data enhancement method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of visual inspection, and in particular, to a method and apparatus for enhancing image data, an electronic device, and a storage medium.
Background
In the field of industrial automatic production, automatic identification and positioning of objects by using machine vision are measures for improving the intellectualization of a production line, and with the progress of technology, artificial intelligence technology based on convolutional neural networks is a current development trend for object identification and positioning. The artificial intelligence for identification and localization requires the preparation of a large amount of image material as a dataset that can contain the image features that the target object presents in the face of different lighting conditions (e.g., light intensity variations, illumination angle variations).
However, there are a lot of components with higher smoothness surface in industrial production, and these construction surfaces make the external light source generate specular reflection, so that the image acquisition of the camera may cause overexposure phenomenon, the characteristics of the component surface cannot be completely recorded, and the information richness of the image is reduced. These phenomena tend to occur randomly as the pose of the component changes. In these cases, the adoption of intelligent networks for identification and localization means that a large amount of collected data is required as a training set, which increases the running cost and reduces the production efficiency.
Therefore, in order to solve the technical problem that the surface features of the reflective member cannot be completely recorded due to overexposure phenomenon caused when the reflective member is photographed, a data enhancement method, device, electronic equipment and storage medium for images are needed.
Disclosure of Invention
The application aims to provide a data enhancement method, a device, electronic equipment and a storage medium for images, which are used for carrying out derivation and fusion on reflective member images under different exposure time to carry out data enhancement on the reflective member images, so that the problem that the surface characteristics of the reflective member cannot be completely recorded due to overexposure phenomenon when the reflective member is photographed is solved, the phenomena of overexposure and underexposure of the reflective member when the reflective member faces light sources with different brightness and different angles are avoided, and the data collection efficiency of the reflective member is improved.
In a first aspect, the present application provides a method for enhancing data of an image, for enhancing data of an image of a light reflecting member, comprising the steps of:
acquiring pixel value data and a first exposure time value of a first reflective member image;
calculating an intermediate exposure time value according to the first exposure time value and the pixel value data;
setting a plurality of exposure time values different from the intermediate exposure time value, and acquiring a second reflective member image under the plurality of exposure time values and a third reflective member image under the intermediate exposure time value to obtain a reflective member image dataset;
And deriving and fusing the reflective member image data sets, and calculating to obtain a data enhancement image of the reflective member corresponding to the first reflective member image.
The method for enhancing the data of the image can realize the data enhancement of the image of the light reflecting member, and the image of the light reflecting member under different exposure time is led out and fused to enhance the data of the image of the light reflecting member, so that the problem that the surface characteristics of the light reflecting member can not be completely recorded due to the overexposure phenomenon when the light reflecting member is photographed is solved, the phenomena of overexposure and underexposure of the light reflecting member when the light reflecting member faces light sources with different brightness and different angles are avoided, and the data collection efficiency of the light reflecting member is improved.
Optionally, acquiring pixel value data and a first exposure time value of the first retroreflective member image includes:
acquiring a light reflecting member;
shooting the light reflecting member based on a preset scene to obtain a first light reflecting member image;
pixel value data and a first exposure time value of the first retroreflective member image are acquired.
Optionally, calculating an intermediate exposure time value according to the first exposure time value and the pixel value data, including:
Calculating the average value of the pixel value data to obtain an average pixel value;
and calculating the intermediate exposure time value according to the average pixel value and the first exposure time value.
Optionally, the plurality of exposure time values includes a second exposure time value less than the intermediate exposure time value and a third exposure time value greater than the intermediate exposure time value; the second exposure time value and the third exposure time value are equal in number.
Optionally, setting a plurality of exposure time values different from the intermediate exposure time value, and acquiring a second reflective member image at the plurality of exposure time values and a third reflective member image at the intermediate exposure time value, to obtain a reflective member image dataset, including:
setting a preset number of the second exposure time values and the third exposure time values;
taking the intermediate exposure time value, the second exposure time value and the third exposure time value as references, and shooting the reflective member based on the preset scene to obtain a second reflective member image under the plurality of exposure time values and a third reflective member image under the intermediate exposure time value;
And summarizing the second reflecting member image and the third reflecting member image to obtain the reflecting member image data set.
The method for enhancing the data of the image can enhance the data of the image of the light reflecting member, avoids the phenomena of overexposure and underexposure of the light reflecting member when the light reflecting member faces light sources with different brightness and angles by acquiring the image of the light reflecting member under different exposure times, can collect the image of the light reflecting member under various conditions, and improves the data collecting efficiency of the light reflecting member.
Optionally, deriving and fusing the image dataset of the light reflecting member, and calculating to obtain a data enhancement image of the light reflecting member corresponding to the image of the first light reflecting member, where the data enhancement image includes:
deriving pixel points of each image in the image dataset of the reflecting member to obtain the richness of the image information of the position of the pixel point;
according to the image information richness, calculating to obtain a data enhancement weight value;
and based on the data enhancement weight value, fusing to obtain a data enhancement image of the reflective member corresponding to the first reflective member image.
The data enhancement method of the image provided by the application can realize the data enhancement of the image of the reflective member, and the data enhancement weight value of each pixel point is calculated through the image information richness of each pixel point, so that the data enhancement image of the reflective member corresponding to the reflective member is calculated, and the data collection efficiency of the reflective member is improved.
Optionally, according to the image information richness, calculating to obtain a data enhancement weight value, including:
according to a preset excitation function, combining the image information richness, and calculating the sum of the excitation richness of the positions of the pixel points of each image in the reflective member image data set;
and calculating the proportion of the excitation richness of the position of the pixel point of any image in the reflective member image data set to the sum of the excitation richness of the position of the pixel point based on the preset excitation function and the image information richness, and obtaining the data enhancement weight value.
In a second aspect, the present application provides an image data enhancement device for data enhancing an image of a retroreflective member, comprising:
an acquisition module for acquiring pixel value data and a first exposure time value of the first light reflecting member image;
the calculating module is used for calculating an intermediate exposure time value according to the first exposure time value and the pixel value data;
the setting module is used for setting a plurality of exposure time values different from the intermediate exposure time value, acquiring a second reflective member image under the plurality of exposure time values and a third reflective member image under the intermediate exposure time value, and obtaining a reflective member image data set;
And the deriving module is used for deriving and fusing the reflective member image data sets, and calculating to obtain the data enhancement image of the reflective member corresponding to the first reflective member image.
According to the data enhancement device for the image, the reflective member images under different exposure time are derived and fused to conduct data enhancement on the reflective member images, so that the problem that the surface characteristics of the reflective member cannot be completely recorded due to overexposure phenomenon caused by photographing of the reflective member is solved, the phenomena of overexposure and underexposure of the reflective member when the reflective member faces light sources with different brightness and different angles are avoided, and the data collection efficiency of the reflective member is improved.
In a third aspect, the application provides an electronic device comprising a processor and a memory, the memory storing a computer program executable by the processor, when executing the computer program, running steps in a method of enhancing data of an image as hereinbefore described.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs steps in a method of enhancing data of an image as hereinbefore described.
The beneficial effects are that:
according to the method, the device, the electronic equipment and the storage medium for enhancing the data of the image, the reflective member images under different exposure time are derived and fused to enhance the data of the reflective member images, so that the problem that the surface characteristics of the reflective member cannot be completely recorded due to overexposure phenomenon when the reflective member is photographed is solved, the phenomena of overexposure and underexposure of the reflective member when the reflective member faces light sources with different brightness and different angles are avoided, and the data collection efficiency of the reflective member is improved.
Drawings
Fig. 1 is a flowchart of a method for enhancing data of an image according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of an image data enhancement device according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Description of the reference numerals: 1. an acquisition module; 2. a computing module; 3. setting a module; 4. a derivation module; 301. a processor; 302. a memory; 303. a communication bus.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, fig. 1 is a method for enhancing data of an image of a reflective member according to some embodiments of the present application, which includes the steps of:
step S101, acquiring pixel value data and a first exposure time value of a first reflective member image;
step S102, calculating an intermediate exposure time value according to the first exposure time value and the pixel value data;
step S103, setting a plurality of exposure time values different from the intermediate exposure time value, and acquiring a second reflective member image under the plurality of exposure time values and a third reflective member image under the intermediate exposure time value to obtain a reflective member image dataset;
step S104, deriving and fusing the reflective member image data sets, and calculating to obtain a data enhancement image of the reflective member corresponding to the first reflective member image.
According to the data enhancement method of the image, the reflective member images under different exposure time are derived and fused to conduct data enhancement on the reflective member images, so that the problem that the surface characteristics of the reflective member cannot be completely recorded due to overexposure phenomenon caused by photographing of the reflective member is solved, the phenomena of overexposure and underexposure of the reflective member when the reflective member faces light sources with different brightness and different angles are avoided, and the data collection efficiency of the reflective member is improved.
Specifically, in step S101, acquiring pixel value data and a first exposure time value of a first light reflecting member image includes:
acquiring a light reflecting member;
shooting the light reflecting member based on a preset scene to obtain a first light reflecting member image;
pixel value data and a first exposure time value of the first retroreflective member image are acquired.
In step S101, a light reflecting member to be enhanced is obtained, the light reflecting member and a corresponding preset scene (an approximate area where the light reflecting member is located) are photographed, a first light reflecting member image is obtained, and pixel value data and a first exposure time value of the first light reflecting member image are obtained.
Specifically, in step S102, an intermediate exposure time value is calculated according to the first exposure time value and the pixel value data, including:
Calculating the average value of the pixel value data to obtain an average pixel value;
and calculating an intermediate exposure time value according to the average pixel value and the first exposure time value.
In step S102, luminance average analysis is performed on the first reflective member image, an average operation (that is, calculating an average value) is performed on pixel values (pixel value data) of all pixel points of the first reflective member image, to obtain an average value (average pixel value), and an intermediate exposure time value is calculated according to the average pixel value and the first exposure time value, where a calculation formula of the intermediate exposure time value specifically includes:
wherein ,for intermediate exposure time values, +.>For the first exposure time value,/>The representative pixel value 125 represents an intermediate value between the pixel values ranging from 0 to 255 for calculating an intermediate exposure time value (the maximum pixel value of a typical image is 255). />(i.e.)> and />,/>Also include the following references-> and />) The response function is defined as a response function of the camera, and the response function records the mapping relation of the scene light quantity of a certain point in the scene to the pixel value on the photo. exp is an exponential function based on a natural constant e, exp (++>) Expressed as +.>To the power of (I)>Is the average pixel value.
Specifically, in step S103, the plurality of exposure time values includes a second exposure time value smaller than the intermediate exposure time value and a third exposure time value larger than the intermediate exposure time value; the number of second exposure time values and third exposure time values are equal.
Specifically, in step S103, setting a plurality of exposure time values different from the intermediate exposure time value, and acquiring a second light reflecting member image at the plurality of exposure time values and a third light reflecting member image at the intermediate exposure time value, a light reflecting member image dataset is obtained, comprising:
setting a preset number of second exposure time values and third exposure time values;
taking the intermediate exposure time value, the second exposure time value and the third exposure time value as references, and shooting the reflective member based on a preset scene to obtain a second reflective member image under a plurality of exposure time values and a third reflective member image under the intermediate exposure time value;
and summarizing the second reflecting member image and the third reflecting member image to obtain a reflecting member image data set.
In step S103, since the scene light in the same scene point is substantially unchanged for a short time, the pixel value can be changed by modifying the exposure time (exposure time value). Using intermediate exposure time valuesTo capture images and may record image features between certain luminance ranges in the scene. Based on this, a larger brightness range can be covered using a plurality of different exposure times. Set- >The remaining exposure times (a plurality of exposure time values different from the intermediate exposure time value), that is, the preset number of second exposure time values and the preset number of third exposure time values are set, n may take any number of positive integers of 1 or more, depending on the number of the plurality of exposure time values to be set. In the intermediate exposure time value +.>The same number of exposure time values are taken above and below for symmetrically expanding the brightness range that can be covered by different exposure times. Wherein, is +.>The large third exposure time value may be named +.>Equal, than intermediate exposure time value +.>The small second exposure time value may be named +.>Etc.
The calculation formula of the third exposure time value is specifically:
wherein ,is the maximum value of the third exposure time value, +.>Is expressed in exposure time +.>Pixel value of pixel point with lower pixel value equal to 235, < >>Representing the exposure time->The pixel value of the pixel point is 35. The whole calculation formula represents the exposure time +.>The pixel value of the pixel point can be changed from 235 to 35. 235 and 35 (i.e.)> and />) Corresponding to response function->The curve is leaning towards the minimum and maximum ends, and because the rate of change across the response function is extremely large, taking both ends directly 0 and 255 would make the error extremely large. Thus selecting the approach 35 and 235 as alternatives.
The calculation formula of the second exposure time value is specifically:
wherein ,is the minimum value of the second exposure time value, < >>Is expressed in exposure time +.>Pixel value of pixel point with lower pixel value equal to 35, < >>Representing the exposure time->The pixel value of the pixel point is 235. The whole calculation formula represents the exposure time +.>The pixel value of the pixel point can be changed from 35 to 235.
Setting a specific intermediate exposure time valueA large third exposure time (or a value +.>Small second exposure time) in order to capture the same scene with a slightly larger (or slightly smaller) exposure time, thereby reducing the impact of underexposure or certain features due to shadows and occlusions at the original exposure time.
In step S103, an intermediate exposure time value is usedIn the interval to the minimum value of the second exposure time value and in the intermediate exposure time value +.>Extracting the same number (preset number n) of exposure time values from the interval reaching the maximum value of the third exposure time value to obtain a second exposure time value and a third exposure time value, and using the intermediate exposure time value, the second exposure time value and the third exposure time value to obtain a reflective component and a corresponding preset value Shooting a scene to obtain a second reflecting member image and a third reflecting member image, and summarizing the second reflecting member image and the third reflecting member image to obtain a reflecting member image dataset +.>,/>={/>Element I represents the reflective member images (i.e., the second reflective member image and the third reflective member image) of the same scene obtained at different exposure times, ">For the third reflective member image at the intermediate exposure time value,/for the third reflective member image at the intermediate exposure time value>For a third scene image corresponding to a third exposure time value,/for a third scene image corresponding to a third exposure time value>And (3) a second scene image corresponding to a second exposure time value, wherein n is a positive integer.
Specifically, in step S104, the deriving and fusing the image dataset of the reflective member to obtain a data enhanced image of the reflective member corresponding to the image of the first reflective member, including:
deriving pixel points of each image in the image dataset of the reflective member to obtain the richness of the image information of the positions of the pixel points;
according to the richness of the image information, calculating to obtain a data enhancement weight value;
and based on the data enhancement weight value, fusing to obtain a data enhancement image of the reflective member corresponding to the first reflective member image.
In step S104, a retroreflective member image dataset is obtained Middle pictureFirst derivative of pixel value (image dataset for retroreflective member +.>The pixel points of all the images in the image are subjected to derivation), and the image information richness of the positions of the pixel points is obtained, wherein the calculation formula of the image information richness is specifically as follows:
wherein ,the image information richness is the position of the pixel point positioned at the (i, j) coordinate in the q (1-q-2n+1, q is an integer), and Z (i, j) is the pixel value of the pixel point positioned at the (i, j) coordinate. Only the image information richness of the pixel points from the abscissa and the ordinate of each image to the extremum-1 (extremum minus one) is calculated, the pixel points in the column and the row on the edge are ignored or are respectively equal to the image information richness of the pixel points in the column and the row on the edge, and the extremum is the numerical value of the length and the width of the corresponding image.
Specifically, in step S104, according to the richness of the image information, a data enhancement weight value is calculated, including:
according to a preset excitation function, combining the image information richness, and calculating the sum of the excitation richness of the positions of the pixel points of each image in the image data set of the reflecting member;
and calculating the proportion of the excitation richness of the position of the pixel point of any image in the reflective member image data set in the sum of the excitation richness of the position of the pixel point based on a preset excitation function and the image information richness, and obtaining a data enhancement weight value.
In step S104, according to a preset excitation function and in combination with the image information richness, calculating the proportion of the excitation richness of the pixel point of any image in the reflective member image data set in the sum of the excitation richness of the pixel point, to obtain a data enhancement weight value, wherein the calculation formula of the data enhancement weight value specifically includes:
wherein ,weight value is enhanced for data,/->Enhancing weight value for data of pixel point at (i, j) coordinate in the (q) th image>Is the sum of the excitation richness of the positions of the pixel points located at the (i, j) coordinates in all the images,/for the pixel points>Is the excitation richness of the pixel point at the (i, j) coordinate in the q-th image,/for the pixel point at the (i, j) coordinate>E is a natural constant, < >>Is an excitation function.
The excitation function makes the weight (data enhancement weight value) positively correlated with the first derivative (image information richness) in a certain range, i.e., the data enhancement weight value increases with the increase of the image information richness in a certain range. When the image information richness is too large, the excitation function can limit the data enhancement weight value to be stabilized at a peak value. The excitation function is set, so that the influence of excessive richness of image information on the data enhancement weight value caused by noise occurring at any position of any image in the image dataset of the reflecting component can be avoided.
Based on the data enhancement weight value, the data enhancement image of the reflective member corresponding to the first reflective member image is obtained through fusion, namely the product of the data enhancement weight value of the position of the middle pixel point of the (i, j) coordinate and the pixel value of the pixel point in all images of the reflective member image dataset is added, the data enhancement image of the reflective member corresponding to the first reflective member image is obtained through fusion, and the calculation formula of the data enhancement image is specifically as follows:
wherein ,pixel value of pixel point located at (i, j) coordinates in data enhanced image,/for the pixel point>Is the pixel value of the pixel point located at the (i, j) coordinate in the q-th image.
According to the data enhancement method of the image, the pixel value data and the first exposure time value of the first reflective member image are obtained, the intermediate exposure time value is calculated according to the first exposure time value and the pixel value data, a plurality of exposure time values different from the intermediate exposure time value are set, the second reflective member image under the plurality of exposure time values and the third reflective member image under the intermediate exposure time value are obtained, the reflective member image dataset is subjected to derivation and fusion, and the data enhancement image of the reflective member corresponding to the first reflective member image is calculated; therefore, the problem that the surface characteristics of the light reflecting member cannot be completely recorded due to overexposure phenomenon caused by the fact that the light reflecting member is photographed is solved by deriving and fusing the light reflecting member images under different exposure time, the phenomena of overexposure and underexposure of the light reflecting member when the light reflecting member faces light sources with different brightness and different angles are avoided, and the data collection efficiency of the light reflecting member is improved.
Referring to fig. 2, the present application provides an image data enhancement apparatus for data enhancing an image of a retroreflective member, comprising:
an acquisition module 1 for acquiring pixel value data and a first exposure time value of the first light reflecting member image;
a calculating module 2, configured to calculate an intermediate exposure time value according to the first exposure time value and the pixel value data;
a setting module 3, configured to set a plurality of exposure time values different from the intermediate exposure time value, and acquire a second reflective member image under the plurality of exposure time values and a third reflective member image under the intermediate exposure time value, to obtain a reflective member image dataset;
and the deriving module 4 is used for deriving and fusing the reflective member image data sets, and calculating to obtain a data enhancement image of the reflective member corresponding to the first reflective member image.
According to the data enhancement device for the image, the reflective member images under different exposure time are derived and fused to conduct data enhancement on the reflective member images, so that the problem that the surface characteristics of the reflective member cannot be completely recorded due to overexposure phenomenon caused by photographing of the reflective member is solved, the phenomena of overexposure and underexposure of the reflective member when the reflective member faces light sources with different brightness and different angles are avoided, and the data collection efficiency of the reflective member is improved.
Specifically, the acquisition module 1 performs, when acquiring the pixel value data and the first exposure time value of the first light reflecting member image:
acquiring a light reflecting member;
shooting the light reflecting member based on a preset scene to obtain a first light reflecting member image;
pixel value data and a first exposure time value of the first retroreflective member image are acquired.
When the obtaining module 1 is executed, a light reflecting member to be enhanced is obtained, the light reflecting member and a corresponding preset scene (the approximate area where the light reflecting member is located) are shot, a first light reflecting member image is obtained, and pixel value data and a first exposure time value of the first light reflecting member image are obtained.
Specifically, the calculation module 2 performs, when calculating the intermediate exposure time value from the first exposure time value and the pixel value data:
calculating the average value of the pixel value data to obtain an average pixel value;
and calculating an intermediate exposure time value according to the average pixel value and the first exposure time value.
When the calculation module 2 performs the luminance average analysis on the first reflective component image, the pixel values (pixel value data) of all the pixel points of the first reflective component image are subjected to an average operation (i.e. an average value is calculated) to obtain an average value (average pixel value) According to the average pixel value and the first exposure time value, calculating to obtain an intermediate exposure time value, wherein a calculation formula of the intermediate exposure time value specifically comprises the following steps:
wherein ,for intermediate exposure time values, +.>For the first exposure time value,/>The representative pixel value 125 represents an intermediate value between the pixel values ranging from 0 to 255 for calculating an intermediate exposure time value (the maximum pixel value of a typical image is 255). />(i.e.)> and />,/>Also include the following references-> and />) The response function is defined as a response function of the camera, and the response function records the mapping relation of the scene light quantity of a certain point in the scene to the pixel value on the photo. exp is an exponential function based on a natural constant e, exp (++>) Expressed as +.>To the power of (I)>Is the average pixel value.
Specifically, the plurality of exposure time values includes a second exposure time value that is less than the intermediate exposure time value and a third exposure time value that is greater than the intermediate exposure time value; the number of second exposure time values and third exposure time values are equal.
Specifically, the setting module 3 sets a plurality of exposure time values different from the intermediate exposure time values, and acquires a second light reflecting member image at the plurality of exposure time values and a third light reflecting member image at the intermediate exposure time values, when a light reflecting member image dataset is obtained, performs:
Setting a preset number of second exposure time values and third exposure time values;
taking the intermediate exposure time value, the second exposure time value and the third exposure time value as references, and shooting the reflective member based on a preset scene to obtain a second reflective member image under a plurality of exposure time values and a third reflective member image under the intermediate exposure time value;
and summarizing the second reflecting member image and the third reflecting member image to obtain a reflecting member image data set.
The setting module 3, when executed, can change the pixel value by modifying the exposure time (exposure time value) since the scene light in the same scene point is substantially unchanged for a short time. Using intermediate exposure timesValue ofTo capture images and may record image features between certain luminance ranges in the scene. Based on this, a larger brightness range can be covered using a plurality of different exposure times. Set->The remaining exposure times (a plurality of exposure time values different from the intermediate exposure time value), that is, the preset number of second exposure time values and the preset number of third exposure time values are set, n may take any number of positive integers of 1 or more, depending on the number of the plurality of exposure time values to be set. In the intermediate exposure time value +. >The same number of exposure time values are taken above and below for symmetrically expanding the brightness range that can be covered by different exposure times. Wherein, is +.>The large third exposure time value may be named +.>Equal, than intermediate exposure time value +.>The small second exposure time value may be named +.>Etc.
The calculation formula of the third exposure time value is specifically:
wherein ,is the maximum value of the third exposure time value, +.>Is expressed in exposure time +.>Pixel value of pixel point with lower pixel value equal to 235, < >>Representing the exposure time->The pixel value of the pixel point is 35. The whole calculation formula represents the exposure time +.>The pixel value of the pixel point can be changed from 235 to 35. 235 and 35 (i.e.)> and />) Corresponding to response function->The curve is leaning towards the minimum and maximum ends, and because the rate of change across the response function is extremely large, taking both ends directly 0 and 255 would make the error extremely large. Thus selecting the approach 35 and 235 as alternatives.
The calculation formula of the second exposure time value is specifically:
wherein ,is the minimum value of the second exposure time value, < >>Is expressed in exposure time +.>Pixel value of pixel point with lower pixel value equal to 35, < >>Representing the exposure time- >The pixel value of the pixel point is 235. The whole calculation formula represents the exposure time +.>The pixel value of the pixel point can be changed from 35 to 235.
Setting a specific intermediate exposure time valueA large third exposure time (or a value +.>Small second exposure time) in order to capture the same scene with a slightly larger (or slightly smaller) exposure time, thereby reducing the impact of underexposure or certain features due to shadows and occlusions at the original exposure time.
The setting module 3, when executing, intermediates the exposure time valueIn the interval to the minimum value of the second exposure time value and in the intermediate exposure time value +.>Extracting the same number (preset number n) of exposure time values from the interval from the maximum value of the third exposure time value to obtain a second exposure time value and a third exposure time value, shooting the reflective member and the corresponding preset scene by using the intermediate exposure time value, the second exposure time value and the third exposure time value to obtain a second reflective member image and a third reflective member image, and summarizing the second reflective member image and the third reflective member image to obtain a reflective member image data set,/>={/>Element I represents the reflective member images (i.e., the second reflective member image and the third reflective member image) of the same scene obtained at different exposure times, " >For the third reflective member image at the intermediate exposure time value,/for the third reflective member image at the intermediate exposure time value>For a third scene image corresponding to a third exposure time value,/for a third scene image corresponding to a third exposure time value>And (3) a second scene image corresponding to a second exposure time value, wherein n is a positive integer.
Specifically, when the derivative module 4 derives and fuses the reflective member image data set to obtain the data enhanced image of the reflective member corresponding to the first reflective member image, it executes:
deriving pixel points of each image in the image dataset of the reflective member to obtain the richness of the image information of the positions of the pixel points;
according to the richness of the image information, calculating to obtain a data enhancement weight value;
and based on the data enhancement weight value, fusing to obtain a data enhancement image of the reflective member corresponding to the first reflective member image.
The deriving module 4, when executing, derives a reflective member image datasetFirst derivative of the image pixel value of the middle (image data set for retroreflective member +.>The pixel points of all the images in the image are subjected to derivation), and the image information richness of the positions of the pixel points is obtained, wherein the calculation formula of the image information richness is specifically as follows:
wherein ,the image information richness is the position of the pixel point positioned at the (i, j) coordinate in the q (1-q-2n+1, q is an integer), and Z (i, j) is the pixel value of the pixel point positioned at the (i, j) coordinate. Only the image information richness of the pixel points from the abscissa and the ordinate of each image to the extremum-1 (extremum minus one) is calculated, the pixel points in the column and the row on the edge are ignored or are respectively equal to the image information richness of the pixel points in the column and the row on the edge, and the extremum is the numerical value of the length and the width of the corresponding image.
Specifically, when the derivative module 4 calculates a data enhancement weight value according to the richness of the image information, the derivative module performs:
according to a preset excitation function, combining the image information richness, and calculating the sum of the excitation richness of the positions of the pixel points of each image in the image data set of the reflecting member;
and calculating the proportion of the excitation richness of the position of the pixel point of any image in the reflective member image data set in the sum of the excitation richness of the position of the pixel point based on a preset excitation function and the image information richness, and obtaining a data enhancement weight value.
When the derivation module 4 executes, according to a preset excitation function and by combining with the image information richness, calculating the proportion of the excitation richness of the pixel point of any image in the reflective member image data set at the sum of the excitation richness of the pixel point, and obtaining a data enhancement weight value, wherein the calculation formula of the data enhancement weight value specifically comprises:
wherein ,weight value is enhanced for data,/->Enhancing weight value for data of pixel point at (i, j) coordinate in the (q) th image>Is the sum of the excitation richness of the positions of the pixel points located at the (i, j) coordinates in all the images,/for the pixel points >Is the excitation richness of the pixel point at the (i, j) coordinate in the q-th image,/for the pixel point at the (i, j) coordinate>E is a natural constant, < >>Is an excitation function.
The excitation function makes the weight (data enhancement weight value) positively correlated with the first derivative (image information richness) in a certain range, i.e., the data enhancement weight value increases with the increase of the image information richness in a certain range. When the image information richness is too large, the excitation function can limit the data enhancement weight value to be stabilized at a peak value. The excitation function is set, so that the influence of excessive richness of image information on the data enhancement weight value caused by noise occurring at any position of any image in the image dataset of the reflecting component can be avoided.
Based on the data enhancement weight value, the data enhancement image of the reflective member corresponding to the first reflective member image is obtained through fusion, namely the product of the data enhancement weight value of the position of the middle pixel point of the (i, j) coordinate and the pixel value of the pixel point in all images of the reflective member image dataset is added, the data enhancement image of the reflective member corresponding to the first reflective member image is obtained through fusion, and the calculation formula of the data enhancement image is specifically as follows:
wherein ,pixel value of pixel point located at (i, j) coordinates in data enhanced image,/for the pixel point>Is the pixel value of the pixel point located at the (i, j) coordinate in the q-th image.
The data enhancement device of the image can obtain the pixel value data and the first exposure time value of the first reflective member image, calculate the intermediate exposure time value according to the first exposure time value and the pixel value data, set a plurality of exposure time values different from the intermediate exposure time value, obtain the second reflective member image under the plurality of exposure time values and the third reflective member image under the intermediate exposure time value, obtain the reflective member image dataset, derive and fuse the reflective member image dataset, calculate the data enhancement image of the reflective member corresponding to the first reflective member image; therefore, the problem that the surface characteristics of the light reflecting member cannot be completely recorded due to overexposure phenomenon caused by the fact that the light reflecting member is photographed is solved by deriving and fusing the light reflecting member images under different exposure time, the phenomena of overexposure and underexposure of the light reflecting member when the light reflecting member faces light sources with different brightness and different angles are avoided, and the data collection efficiency of the light reflecting member is improved.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where the electronic device includes: processor 301 and memory 302, the processor 301 and memory 302 being interconnected and in communication with each other by a communication bus 303 and/or other form of connection mechanism (not shown), the memory 302 storing a computer program executable by the processor 301, the processor 301 executing the computer program when the electronic device is running to perform the data enhancement method of an image in any of the alternative implementations of the above embodiments to implement the following functions: acquiring pixel value data and a first exposure time value of a first reflective member image, calculating to obtain an intermediate exposure time value according to the first exposure time value and the pixel value data, setting a plurality of exposure time values different from the intermediate exposure time value, acquiring a second reflective member image under the plurality of exposure time values and a third reflective member image under the intermediate exposure time value, obtaining a reflective member image dataset, deriving and fusing the reflective member image dataset, and calculating to obtain a data enhancement image of a reflective member corresponding to the first reflective member image.
An embodiment of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs a method of enhancing data of an image in any of the alternative implementations of the above embodiments to implement the following functions: acquiring pixel value data and a first exposure time value of a first reflective member image, calculating to obtain an intermediate exposure time value according to the first exposure time value and the pixel value data, setting a plurality of exposure time values different from the intermediate exposure time value, acquiring a second reflective member image under the plurality of exposure time values and a third reflective member image under the intermediate exposure time value, obtaining a reflective member image dataset, deriving and fusing the reflective member image dataset, and calculating to obtain a data enhancement image of a reflective member corresponding to the first reflective member image. The storage medium may be implemented by any type of volatile or nonvolatile Memory device or combination thereof, such as static random access Memory (Static Random Access Memory, SRAM), electrically erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), erasable Programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), programmable Read-Only Memory (PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
Further, the units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Furthermore, functional modules in various embodiments of the present application may be integrated together to form a single portion, or each module may exist alone, or two or more modules may be integrated to form a single portion.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and variations will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (8)

1. A method for data enhancement of an image of a retroreflective member, comprising the steps of:
acquiring pixel value data and a first exposure time value of a first reflective member image;
calculating an intermediate exposure time value according to the first exposure time value and the pixel value data;
setting a plurality of exposure time values different from the intermediate exposure time value, and acquiring a second reflective member image under the plurality of exposure time values and a third reflective member image under the intermediate exposure time value to obtain a reflective member image dataset;
Fusing the reflective member image data sets, and calculating to obtain a data enhancement image of the reflective member corresponding to the first reflective member image;
fusing the reflective member image data sets, and calculating to obtain a data enhancement image of the reflective member corresponding to the first reflective member image, including:
calculating the image information richness of the positions of the pixel points of each image in the image dataset of the reflecting member according to a preset image information richness calculation formula;
according to the image information richness, calculating to obtain a data enhancement weight value;
based on the data enhancement weight value, fusing to obtain a data enhancement image of the reflective member corresponding to the first reflective member image;
according to the image information richness, a data enhancement weight value is obtained through calculation, and the method comprises the following steps:
according to a preset excitation function, combining the image information richness, and calculating the excitation richness of the positions of the pixel points of each image in the image data set of the reflecting component;
calculating the sum of excitation richness of the same pixel point position of each image in the reflective member image data set;
calculating the proportion of the excitation richness of the position of the pixel point of any image in the reflective member image data set to the sum of the excitation richness of the corresponding positions to obtain the data enhancement weight value;
The preset calculation formula of the image information richness specifically comprises the following steps:
wherein ,the image information richness is the position of the pixel point located at the (i, j) coordinate in the q-th image, wherein, q is more than or equal to 1 and less than or equal to 2n+1, q is an integer, 2n is the number of the exposure time values, 2n+1 is the number of the images in the image dataset of the reflecting component, Z (i, j) is the pixel value of the pixel point located at the (i, j) coordinate in the q-th image, and the pixel points of the most edge column and the most edge row are ignored or are respectively equal to the image information richness of the pixel points of the last column and the last line.
2. The method of claim 1, wherein acquiring pixel value data and a first exposure time value of the first retroreflective member image comprises:
acquiring a light reflecting member;
shooting the light reflecting member based on a preset scene to obtain a first light reflecting member image;
pixel value data and a first exposure time value of the first retroreflective member image are acquired.
3. The method of claim 1, wherein calculating an intermediate exposure time value from the first exposure time value and the pixel value data, comprises:
Calculating the average value of the pixel value data to obtain an average pixel value;
and calculating the intermediate exposure time value according to the average pixel value and the first exposure time value.
4. The method of claim 1, wherein the plurality of exposure time values includes a second exposure time value that is less than the intermediate exposure time value and a third exposure time value that is greater than the intermediate exposure time value; the second exposure time value and the third exposure time value are equal in number.
5. The method of enhancing data of an image according to claim 4, wherein setting a plurality of exposure time values different from the intermediate exposure time value, and acquiring a second light reflecting member image at the plurality of exposure time values and a third light reflecting member image at the intermediate exposure time value, to obtain a light reflecting member image dataset, comprises:
setting a preset number of the second exposure time values and the third exposure time values;
taking the intermediate exposure time value, the second exposure time value and the third exposure time value as references, and shooting the reflective member based on a preset scene to obtain a second reflective member image under the plurality of exposure time values and a third reflective member image under the intermediate exposure time value;
And summarizing the second reflecting member image and the third reflecting member image to obtain the reflecting member image data set.
6. An image data enhancement device for data enhancement of an image of a retroreflective member, comprising:
an acquisition module for acquiring pixel value data and a first exposure time value of the first light reflecting member image;
the calculating module is used for calculating an intermediate exposure time value according to the first exposure time value and the pixel value data;
the setting module is used for setting a plurality of exposure time values different from the intermediate exposure time value, acquiring a second reflective member image under the plurality of exposure time values and a third reflective member image under the intermediate exposure time value, and obtaining a reflective member image data set;
the fusion module is used for fusing the reflective member image data sets and calculating to obtain a data enhancement image of the reflective member corresponding to the first reflective member image;
the fusion module is configured to fuse the image data sets of the light reflecting members, calculate a data enhancement image of the light reflecting member corresponding to the image of the first light reflecting member, and include:
Calculating the image information richness of the positions of the pixel points of each image in the image dataset of the reflecting member according to a preset image information richness calculation formula;
according to the image information richness, calculating to obtain a data enhancement weight value;
based on the data enhancement weight value, fusing to obtain a data enhancement image of the reflective member corresponding to the first reflective member image;
according to the image information richness, a data enhancement weight value is obtained through calculation, and the method comprises the following steps:
according to a preset excitation function, combining the image information richness, and calculating the excitation richness of the positions of the pixel points of each image in the image data set of the reflecting component;
calculating the sum of excitation richness of the same pixel point position of each image in the reflective member image data set;
calculating the proportion of the excitation richness of the position of the pixel point of any image in the reflective member image data set to the sum of the excitation richness of the corresponding positions to obtain the data enhancement weight value;
the preset calculation formula of the image information richness specifically comprises the following steps:
wherein ,is the image information richness of the position of the pixel point positioned at the (i, j) coordinate in the (q) th image, wherein, q is an integer and is more than or equal to 1 and less than or equal to 2n+1, and 2n is the multiple The number of exposure time values 2n+1 is the number of images in the reflective member image dataset, Z (i, j) is the pixel value of the pixel located at the (i, j) coordinate in the q-th image, and the pixel points of the most edge column and row are ignored or are respectively equal to the image information richness of the pixel points of the last column and row.
7. An electronic device comprising a processor and a memory, the memory storing a computer program executable by the processor, when executing the computer program, running the steps in the method of enhancing data of an image as claimed in any one of claims 1-5.
8. A computer readable storage medium, on which a computer program is stored which, when being executed by a processor, performs the steps in the method of enhancing data of an image as claimed in any one of claims 1-5.
CN202310758667.7A 2023-06-26 2023-06-26 Image data enhancement method and device, electronic equipment and storage medium Active CN116506739B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310758667.7A CN116506739B (en) 2023-06-26 2023-06-26 Image data enhancement method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310758667.7A CN116506739B (en) 2023-06-26 2023-06-26 Image data enhancement method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116506739A CN116506739A (en) 2023-07-28
CN116506739B true CN116506739B (en) 2023-09-12

Family

ID=87316946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310758667.7A Active CN116506739B (en) 2023-06-26 2023-06-26 Image data enhancement method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116506739B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103247036A (en) * 2012-02-10 2013-08-14 株式会社理光 Multiple-exposure image fusion method and device
CN107635102A (en) * 2017-10-30 2018-01-26 广东欧珀移动通信有限公司 High dynamic range images exposure compensating value-acquiring method and device
CN110177221A (en) * 2019-06-25 2019-08-27 维沃移动通信有限公司 The image pickup method and device of high dynamic range images
CN111915505A (en) * 2020-06-18 2020-11-10 北京迈格威科技有限公司 Image processing method, image processing device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103247036A (en) * 2012-02-10 2013-08-14 株式会社理光 Multiple-exposure image fusion method and device
CN107635102A (en) * 2017-10-30 2018-01-26 广东欧珀移动通信有限公司 High dynamic range images exposure compensating value-acquiring method and device
CN110177221A (en) * 2019-06-25 2019-08-27 维沃移动通信有限公司 The image pickup method and device of high dynamic range images
CN111915505A (en) * 2020-06-18 2020-11-10 北京迈格威科技有限公司 Image processing method, image processing device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116506739A (en) 2023-07-28

Similar Documents

Publication Publication Date Title
Gardner et al. Learning to predict indoor illumination from a single image
CN110248096B (en) Focusing method and device, electronic equipment and computer readable storage medium
CN110276767B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN103209298B (en) Camera focuses on adaptability fuzzy matching models fitting automatically
US10269130B2 (en) Methods and apparatus for control of light field capture object distance adjustment range via adjusting bending degree of sensor imaging zone
US8332429B2 (en) Photography assistant and method for assisting a user in photographing landmarks and scenes
CN107734267B (en) Image processing method and device
CN101785025B (en) System and method for three-dimensional object reconstruction from two-dimensional images
CN105407276A (en) Photographing method and equipment
CN110378945A (en) Depth map processing method, device and electronic equipment
CN110213491B (en) Focusing method, device and storage medium
JP2007157063A (en) Image processor, image processing method and computer program
CN107734264B (en) Image processing method and device
CN110248101B (en) Focusing method and device, electronic equipment and computer readable storage medium
CN107705278B (en) Dynamic effect adding method and terminal equipment
JP2011019177A (en) Program for specify subject position, and camera
CN103136745B (en) Utilization defocuses the system and method for pillbox image execution estimation of Depth
CN104639927A (en) Method for shooting stereoscopic image and electronic device
CN111866374A (en) Image shooting method and device, pan-tilt camera and storage medium
CN111741214A (en) Image processing method and device and electronic equipment
JP7013144B2 (en) Image processing equipment, image processing methods and programs
US11257237B2 (en) Optimized exposure control for improved depth mapping
CN115631291A (en) Real-time re-illumination method and apparatus, device, and medium for augmented reality
CN106257918B (en) The judgment method of picture pick-up device and light quantity variation characteristic
CN116506739B (en) Image data enhancement method and device, electronic equipment and storage medium

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