CN118042285A - Industrial camera self-adaptive exposure method and device for dimming film and electronic equipment - Google Patents

Industrial camera self-adaptive exposure method and device for dimming film and electronic equipment Download PDF

Info

Publication number
CN118042285A
CN118042285A CN202410176318.9A CN202410176318A CN118042285A CN 118042285 A CN118042285 A CN 118042285A CN 202410176318 A CN202410176318 A CN 202410176318A CN 118042285 A CN118042285 A CN 118042285A
Authority
CN
China
Prior art keywords
preset
industrial camera
gray
threshold
parameter
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.)
Pending
Application number
CN202410176318.9A
Other languages
Chinese (zh)
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.)
Zhuhai Shenkepu Industrial Technology Co ltd
Original Assignee
Zhuhai Shenkepu Industrial 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 Zhuhai Shenkepu Industrial Technology Co ltd filed Critical Zhuhai Shenkepu Industrial Technology Co ltd
Priority to CN202410176318.9A priority Critical patent/CN118042285A/en
Publication of CN118042285A publication Critical patent/CN118042285A/en
Pending legal-status Critical Current

Links

Landscapes

  • Studio Devices (AREA)

Abstract

The invention provides an industrial camera self-adaptive exposure method and device for a dimming film and electronic equipment, relating to the technical field of image processing, and comprising the following steps: acquiring an optical product image acquired by an industrial camera according to a preset photographing path; carrying out gray value calculation processing on the optical product image through a preset gray calculation model, and determining a dimming film area image in the optical product image and an average gray value corresponding to the dimming film area image; and carrying out gray scale range detection processing on the average gray scale value according to a preset gray scale range threshold value, and carrying out parameter adjustment processing on the adaptive exposure parameters corresponding to the industrial camera through the adaptive adjustment model when the gray scale range detection fails, so as to determine target adaptive exposure parameters. The invention can adaptively adjust exposure parameters, thereby reducing equipment debugging difficulty and remarkably improving the stability of imaging quality of an industrial camera when shooting a product containing a dimming film.

Description

Industrial camera self-adaptive exposure method and device for dimming film and electronic equipment
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an industrial camera adaptive exposure method and apparatus for a dimming film, and an electronic device.
Background
The dimming diaphragm (flexible dimming film) is a flexible diaphragm product comprising: at present, the related art proposes that an industrial camera usually uses fixed parameters (light source brightness, camera exposure and camera gain) to take a picture, but because the dimming films have different batches of products in the same model during production, the surface reflectivity of the dimming films in different batches of the same model is different in the production process, so that the brightness difference of the same optical system and the same optical parameters in image presentation is larger when different products are taken, the scheme of taking the picture by using the fixed parameters cannot be compatible with the conditions of all products, and the problem of instability of a visual detection system is easily caused when the reflectivity of the products changes.
Disclosure of Invention
Therefore, the invention aims to provide an industrial camera self-adaptive exposure method and device for a dimming film and electronic equipment, which can adaptively adjust exposure parameters, thereby reducing equipment debugging difficulty and remarkably improving the stability of imaging quality of the industrial camera when shooting a product containing the dimming film.
In a first aspect, an embodiment of the present invention provides an industrial camera adaptive exposure method for a dimming film, including: acquiring an optical product image acquired by an industrial camera according to a preset photographing path; carrying out gray value calculation processing on the optical product image through a preset gray calculation model, and determining a dimming film area image in the optical product image and an average gray value corresponding to the dimming film area image; and carrying out gray scale range detection processing on the average gray scale value according to a preset gray scale range threshold value, and carrying out parameter adjustment processing on the adaptive exposure parameters corresponding to the industrial camera through the adaptive adjustment model when the gray scale range detection fails, so as to determine target adaptive exposure parameters.
In one embodiment, the step of acquiring an image of an optical product acquired by an industrial camera according to a preset photographing path includes: setting a frame of a dimming film in an optical product as a preset photographing path; and establishing a coordinate system by using a preset photographing path, determining the center point coordinate of the preset photographing path as an automatic exposure correction point under the coordinate system, so that the industrial camera performs industrial camera image acquisition processing on the automatic exposure correction point, and determining an optical product image containing a complete dimming film.
In one embodiment, the step of performing gray value calculation processing on the optical product image by using a preset gray calculation model to determine a dimming film area image in the optical product image and an average gray value corresponding to the dimming film area image includes: carrying out image feature extraction processing on the optical product image through a preset maximum communication area analysis model, and determining a dimming film area image in the optical product image; and carrying out gray value calculation processing on the dimming film region image through a preset gray calculation model, and determining an average gray value corresponding to the dimming film region image.
In one embodiment, the step of setting the preset gray range threshold to be between the first gray range threshold and the second gray range threshold and performing gray range detection processing on the average gray value according to the preset gray range threshold includes: when the average gray value is smaller than the first gray threshold or larger than the second gray threshold, determining that the gray range detection is not passed, performing parameter adjustment processing on the current adaptive exposure parameters of the industrial camera based on the adaptive adjustment model and the average gray value, and re-acquiring the optical product image based on the adjusted adaptive exposure parameters to perform gray value calculation processing and gray range detection processing.
In one embodiment, the step of setting the preset gray range threshold to be between the first gray range threshold and the second gray range threshold, and performing gray range detection processing on the average gray value according to the preset gray range threshold, further includes: and when the average gray value is not smaller than the first gray threshold value and not larger than the second gray threshold value, determining that the gray range is detected, and determining the current adaptive exposure parameter of the industrial camera as the target adaptive exposure parameter.
In one embodiment, the adaptive exposure parameters include: the method comprises the steps of carrying out parameter adjustment processing on the current adaptive exposure parameters of the industrial camera based on the adaptive adjustment model and the average gray value, wherein the steps comprise: carrying out parameter adjustment processing on the self-adaptive exposure parameters in sequence according to the order from the large priority, wherein the self-adaptive exposure parameters are light source brightness, industrial camera exposure time and industrial camera overflow in sequence according to the order from the large priority; if the parameter of the first priority is in the preset parameter threshold range corresponding to the parameter, performing parameter fine adjustment on the parameter based on the average gray value; if the parameter of the first priority is not in the preset parameter threshold range corresponding to the parameter, parameter adjustment processing is carried out on the parameter of the next priority.
In one embodiment, the step of parameter tuning the parameter based on the average gray value comprises: for the light source brightness, if the average gray value is smaller than the preset minimum gray value, the light source brightness is increased according to the preset adjustment threshold, and if the average gray value is larger than the preset maximum gray value, the light source brightness is decreased according to the preset adjustment threshold; for the industrial camera exposure time, if the average gray value is smaller than the preset minimum gray value, the industrial camera exposure time is increased according to the preset adjustment threshold, and if the average gray value is larger than the preset maximum gray value, the industrial camera exposure time is reduced according to the preset adjustment threshold; for the industrial camera overflow, if the average gray value is smaller than the preset minimum gray value, the industrial camera overflow is increased according to the preset adjustment threshold, and if the average gray value is larger than the preset maximum gray value, the industrial camera overflow is reduced according to the preset adjustment threshold.
In a second aspect, an embodiment of the present invention further provides an industrial camera adaptive exposure apparatus for a dimming film, the apparatus including: the image acquisition module is used for acquiring an optical product image acquired by the industrial camera according to a preset photographing path; the gray level calculation module is used for carrying out gray level calculation processing on the optical product image through a preset gray level calculation model, and determining a dimming film area image in the optical product image and an average gray level corresponding to the dimming film area image; and the parameter adjusting module is used for carrying out gray scale range detection processing on the average gray scale value according to a preset gray scale range threshold value, carrying out parameter adjustment processing on the adaptive exposure parameters corresponding to the industrial camera through the adaptive adjusting model when the gray scale range detection fails, and determining target adaptive exposure parameters.
In a third aspect, embodiments of the present invention also provide an electronic device comprising a processor and a memory storing computer executable instructions executable by the processor, the processor executing the computer executable instructions to implement the method of any one of the first aspects.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method of any one of the first aspects.
The embodiment of the invention has the following beneficial effects:
According to the industrial camera self-adaptive exposure method, the device and the electronic equipment for the dimming film, after the industrial camera acquires the optical product image acquired according to the preset photographing path, gray value calculation processing is carried out on the optical product image through the preset gray calculation model, the dimming film area image in the optical product image and the average gray value corresponding to the dimming film area image are determined, gray range detection processing is carried out on the average gray value according to the preset gray range threshold, and when the gray range detection fails, parameter adjustment processing is carried out on the self-adaptive exposure parameters corresponding to the industrial camera through the self-adaptive adjustment model, and the target self-adaptive exposure parameters are determined.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of an industrial camera adaptive exposure method for a dimming film according to an embodiment of the present invention;
Fig. 2 is a schematic flow chart of an industrial camera adaptive exposure method for a dimming film according to an embodiment of the present invention;
FIG. 3 is a flowchart of a parameter adjustment method according to an embodiment of the present invention;
Fig. 4 is a schematic structural diagram of an industrial camera adaptive exposure device for a dimming film according to an embodiment of the present invention;
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described in conjunction with the embodiments, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention provides an industrial camera self-adaptive exposure method, an industrial camera self-adaptive exposure device and electronic equipment for a dimming film, which are characterized in that the dimming film is a flexible film product, at present, an industrial camera usually uses fixed parameters (light source brightness, camera exposure and camera gain) to take pictures, but because the dimming film has products of different batches in the same model during production, the surface reflectivity of the dimming film of different batches in the same model is different in the production process, so that the brightness difference of the same optical system and the optical parameters in the process of taking pictures of different products is large, the scheme of taking pictures by using the fixed parameters cannot be compatible with the conditions of all products, and the instability of a visual detection system is easily caused when the reflectivity of the products changes.
Referring to fig. 1, a flow chart of an industrial camera adaptive exposure method for a dimming film mainly includes the following steps S102 to S106:
Step S102, an optical product image acquired by the industrial camera according to a preset photographing path is acquired, wherein the preset photographing path is set along a frame of the light modulation film, in an embodiment, an XYZ axis coordinate system may be established based on the preset photographing path, the coordinates of the photographing path are determined, a central coordinate of the path is calculated, and the central coordinate is taken as an automatic exposure correction point, so that a complete light modulation film image can be ensured to be shot.
Step S104, gray value calculation processing is performed on the optical product image through a preset gray calculation model, a dimming film area image in the optical product image and an average gray value corresponding to the dimming film area image are determined, in one implementation, BOLB analysis is performed on the optical product image through an image preprocessing algorithm such as an image enhancement algorithm, an image binarization algorithm, an on operation and an off operation, a dimming film area in a picture is determined, and then an average gray value of the dimming film area image is calculated through a mean value method.
Step S106, carrying out gray scale detection processing on the average gray scale value according to a preset gray scale threshold value, carrying out parameter adjustment processing on the adaptive exposure parameters corresponding to the industrial camera through an adaptive adjustment model when the gray scale detection fails, determining target adaptive exposure parameters, in one embodiment, setting a standard average gray scale (namely, a preset gray scale threshold value), such as 190+/-10, and identifying whether the average gray scale is in a setting range, if so, completing adaptive exposure adjustment, saving the light source brightness, the industrial camera gain and the exposure time, if not, automatically adjusting the light source brightness, the camera overflow and the exposure time according to the average gray scale of the image, judging whether the automatically adjusted light source brightness, the camera overflow and the exposure time are in a normal range, if so, re-shooting the image, calculating the gray scale, and judging whether the average gray scale is in the setting range, if so, carrying out system fault abnormal alarm.
The industrial camera self-adaptive exposure method for the dimming film provided by the embodiment of the invention can automatically generate the self-adaptive exposure coordinates, so that products with different sizes are compatible, manual interference is not needed, and products with large self-adaptive reflectivity difference can be obtained by automatically adjusting three parameters of the brightness of a light source, the exposure time of the camera and the gain of the camera, so that the image stability of the products and the identification stability of the products can be improved.
Referring to a specific flow diagram of an industrial camera adaptive exposure method for a dimming film shown in fig. 2, an embodiment of the present invention further provides an implementation manner of adaptively adjusting exposure parameters, which is specifically described in the following (1) to (3):
(1) Setting a frame of a light modulation film in an optical product as a preset photographing path, establishing a coordinate system by using the preset photographing path, determining a central point coordinate of the preset photographing path under the coordinate system as an automatic exposure correction point, so that an industrial camera performs industrial camera image acquisition processing on the automatic exposure correction point, determining an optical product image containing a complete light modulation film, in practical application, displacing the industrial camera by the automatic exposure correction point by moving an XYZ axis coordinate system, and resetting parameters such as the light source brightness, the industrial camera exposure time, the industrial camera gain and the like of the industrial camera according to the last photographing parameters, thereby acquiring the industrial camera image.
(2) Image feature extraction processing is carried out on an optical product image through a preset maximum communication area analysis model, a dimming film area image in the optical product image is determined, gray value calculation processing is carried out on the dimming film area image through a preset gray calculation model, an average gray value corresponding to the dimming film area image is determined, in one implementation mode, the dimming film area in a picture is determined through BOLB analysis through BOLB analysis through an image preprocessing algorithm such as an image enhancement algorithm, image binarization, an opening operation and a closing operation, average gray of the dimming film area image is calculated through an image mean method, and finally image average gray information is output, so that algorithm flow wire bundles are formed, system resources are released, wherein the calculation formula of the image mean method is as follows:
(3) When the average gray value is smaller than the first gray threshold or larger than the second gray threshold (i.e. the average gray is not in the preset gray range threshold), determining that the gray range detection fails, performing parameter adjustment processing on the current adaptive exposure parameters of the industrial camera based on the adaptive adjustment model and the average gray value, re-acquiring the optical product image based on the adjusted adaptive exposure parameters, performing gray value calculation processing and gray range detection processing, namely judging whether the automatically adjusted light source brightness, the camera overflow and the exposure time are in the normal range, if so, re-shooting the image, calculating the gray and judging whether the average gray is in the set range, if not in the normal range, performing system fault abnormal alarm, and when the average gray value is not smaller than the first gray threshold and not larger than the second gray threshold (i.e. the average gray is in the preset gray range threshold), determining that the gray range detection passes, determining the current adaptive exposure parameters of the industrial camera as target adaptive exposure parameters.
In one embodiment, referring to a flow chart of a parameter adjustment method shown in fig. 3, parameter adjustment processing is sequentially performed on adaptive exposure parameters according to a sequence of from a higher priority to a lower priority, if a parameter of a first priority is within a preset parameter threshold range corresponding to the parameter, parameter fine adjustment is performed on the parameter based on an average gray value, if the parameter of the first priority is not within the preset parameter threshold range corresponding to the parameter, parameter adjustment processing is performed on a parameter of a next priority, wherein the adaptive exposure parameters are sequentially light source brightness, industrial camera exposure time and industrial camera overflow in order of from the higher priority, that is, when the parameter of the first priority is within the range corresponding to the parameter, parameter fine adjustment may be performed on the parameter, but if the parameter of the first priority is not within the range corresponding to the parameter, a final adjustment effect cannot be achieved through fine adjustment, therefore, parameter adjustment with the help of the parameter of the next priority is required. Further, the parameter fine tuning process specifically includes: for the light source brightness, if the average gray value is smaller than the preset minimum gray value, the light source brightness is increased according to the preset adjustment threshold, if the average gray value is larger than the preset maximum gray value, the light source brightness is reduced according to the preset adjustment threshold, for the industrial camera exposure time, if the average gray value is smaller than the preset minimum gray value, the industrial camera exposure time is increased according to the preset adjustment threshold, if the average gray value is larger than the preset maximum gray value, the industrial camera exposure time is reduced according to the preset adjustment threshold, for the industrial camera overflow, if the average gray value is smaller than the preset minimum gray value, the industrial camera overflow is increased according to the preset adjustment threshold, if the average gray value is larger than the preset maximum gray value, the industrial camera overflow is reduced according to the preset adjustment threshold, and in addition, the parameter threshold, namely the range threshold can be adjusted according to the actual use requirement.
In summary, the invention can automatically adjust three parameters of the light source brightness, the industrial camera exposure time and the industrial camera gain, so that when the industrial camera shoots the dimming film products with different reflectances, the image with stable gray scale of the products in the image can be obtained, the stability of imaging quality is improved, thereby improving the stability of a visual detection system and reducing the debugging difficulty of equipment.
For the industrial camera adaptive exposure method for a dimming film provided in the foregoing embodiment, the embodiment of the present invention provides an industrial camera adaptive exposure device for a dimming film, referring to a schematic structural diagram of the industrial camera adaptive exposure device for a dimming film shown in fig. 4, the device includes the following parts:
An image acquisition module 402 for acquiring an optical product image acquired by an industrial camera according to a preset photographing path;
The gray level calculation module 404 performs gray level calculation processing on the optical product image through a preset gray level calculation model, and determines a dimming film area image in the optical product image and an average gray level corresponding to the dimming film area image;
The parameter adjusting module 406 performs gray scale range detection processing on the average gray scale value according to a preset gray scale range threshold, and performs parameter adjustment processing on the adaptive exposure parameters corresponding to the industrial camera through the adaptive adjustment model when the gray scale range detection fails, so as to determine the target adaptive exposure parameters.
The industrial camera self-adaptive exposure device for the dimming film provided by the embodiment of the application can adaptively adjust exposure parameters, thereby reducing equipment debugging difficulty and remarkably improving the stability of imaging quality of the industrial camera when shooting a product containing the dimming film.
In one embodiment, when performing the step of acquiring the image of the optical product acquired by the industrial camera according to the preset photographing path, the image acquisition module 402 is further configured to: setting a frame of a dimming film in an optical product as a preset photographing path; and establishing a coordinate system by using a preset photographing path, determining the center point coordinate of the preset photographing path as an automatic exposure correction point under the coordinate system, so that the industrial camera performs industrial camera image acquisition processing on the automatic exposure correction point, and determining an optical product image containing a complete dimming film.
In one embodiment, when performing the step of performing the gray value calculation process on the optical product image through the preset gray calculation model to determine the image of the light modulation film area in the optical product image and the average gray value corresponding to the image of the light modulation film area, the gray calculation module 404 is further configured to: carrying out image feature extraction processing on the optical product image through a preset maximum communication area analysis model, and determining a dimming film area image in the optical product image; and carrying out gray value calculation processing on the dimming film region image through a preset gray calculation model, and determining an average gray value corresponding to the dimming film region image.
In one embodiment, when the step of performing the gray scale detection process on the average gray scale value according to the preset gray scale threshold between the preset gray scale threshold and the second gray scale threshold is performed, the parameter adjustment module 406 is further configured to: when the average gray value is smaller than the first gray threshold or larger than the second gray threshold, determining that the gray range detection is not passed, performing parameter adjustment processing on the current adaptive exposure parameters of the industrial camera based on the adaptive adjustment model and the average gray value, and re-acquiring the optical product image based on the adjusted adaptive exposure parameters to perform gray value calculation processing and gray range detection processing.
In one embodiment, when the step of performing the gray scale detection process on the average gray scale value according to the preset gray scale threshold between the preset gray scale threshold and the second gray scale threshold is performed, the parameter adjustment module 406 is further configured to: and when the average gray value is not smaller than the first gray threshold value and not larger than the second gray threshold value, determining that the gray range is detected, and determining the current adaptive exposure parameter of the industrial camera as the target adaptive exposure parameter.
In one embodiment, performing adaptive exposure parameters includes: the parameter adjustment module 406 is further configured to: carrying out parameter adjustment processing on the self-adaptive exposure parameters in sequence according to the order from the large priority, wherein the self-adaptive exposure parameters are light source brightness, industrial camera exposure time and industrial camera overflow in sequence according to the order from the large priority; if the parameter of the first priority is in the preset parameter threshold range corresponding to the parameter, performing parameter fine adjustment on the parameter based on the average gray value; if the parameter of the first priority is not in the preset parameter threshold range corresponding to the parameter, parameter adjustment processing is carried out on the parameter of the next priority.
In one embodiment, when performing the step of fine-tuning the parameter based on the average gray value, the parameter adjustment module 406 is further configured to: for the light source brightness, if the average gray value is smaller than the preset minimum gray value, the light source brightness is increased according to the preset adjustment threshold, and if the average gray value is larger than the preset maximum gray value, the light source brightness is decreased according to the preset adjustment threshold; for the industrial camera exposure time, if the average gray value is smaller than the preset minimum gray value, the industrial camera exposure time is increased according to the preset adjustment threshold, and if the average gray value is larger than the preset maximum gray value, the industrial camera exposure time is reduced according to the preset adjustment threshold; for the industrial camera overflow, if the average gray value is smaller than the preset minimum gray value, the industrial camera overflow is increased according to the preset adjustment threshold, and if the average gray value is larger than the preset maximum gray value, the industrial camera overflow is reduced according to the preset adjustment threshold.
The device provided by the embodiment of the present invention has the same implementation principle and technical effects as those of the foregoing method embodiment, and for the sake of brevity, reference may be made to the corresponding content in the foregoing method embodiment where the device embodiment is not mentioned.
The embodiment of the invention provides electronic equipment, which comprises a processor and a storage device; the storage means has stored thereon a computer program which, when executed by the processor, performs the method of any of the embodiments described above.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device 100 includes: a processor 50, a memory 51, a bus 52 and a communication interface 53, the processor 50, the communication interface 53 and the memory 51 being connected by the bus 52; the processor 50 is arranged to execute executable modules, such as computer programs, stored in the memory 51.
The memory 51 may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the system network element and at least one other network element is achieved via at least one communication interface 53 (which may be wired or wireless), and the internet, wide area network, local network, metropolitan area network, etc. may be used.
Bus 52 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 5, but not only one bus or type of bus.
The memory 51 is configured to store a program, and the processor 50 executes the program after receiving an execution instruction, and the method executed by the apparatus for flow defining disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 50 or implemented by the processor 50.
The processor 50 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware in the processor 50 or by instructions in the form of software. The processor 50 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but may also be a digital signal processor (DIGITAL SIGNAL Processing, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), off-the-shelf Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 51 and the processor 50 reads the information in the memory 51 and in combination with its hardware performs the steps of the above method.
The computer program product of the readable storage medium provided by the embodiment of the present invention includes a computer readable storage medium storing a program code, where the program code includes instructions for executing the method described in the foregoing method embodiment, and the specific implementation may refer to the foregoing method embodiment and will not be described herein.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. An industrial camera adaptive exposure method for a dimming film, the method comprising:
acquiring an optical product image acquired by an industrial camera according to a preset photographing path;
Performing gray value calculation processing on the optical product image through a preset gray calculation model, and determining a dimming film area image in the optical product image and an average gray value corresponding to the dimming film area image;
and carrying out gray scale range detection processing on the average gray scale value according to a preset gray scale range threshold value, and carrying out parameter adjustment processing on the adaptive exposure parameters corresponding to the industrial camera through the adaptive adjustment model when the gray scale range detection fails, so as to determine target adaptive exposure parameters.
2. The method for adaptive exposure of industrial cameras for light modulation films according to claim 1, wherein the step of acquiring the image of the optical product acquired by the industrial camera according to a preset photographing path comprises:
Setting a frame of a dimming film in an optical product as a preset photographing path;
And establishing a coordinate system by utilizing the preset photographing path, determining the center point coordinate of the preset photographing path as an automatic exposure correction point under the coordinate system, so that the industrial camera performs industrial camera image acquisition processing on the automatic exposure correction point, and determining the optical product image containing the complete dimming film.
3. The method for adaptive exposure of an industrial camera for a light modulation film according to claim 1, wherein the step of performing gray value calculation processing on the optical product image by a preset gray value calculation model to determine a light modulation film area image in the optical product image and an average gray value corresponding to the light modulation film area image comprises:
performing image feature extraction processing on the optical product image through a preset maximum communication area analysis model, and determining the dimming film area image in the optical product image;
And carrying out gray value calculation processing on the dimming film region image through a preset gray calculation model, and determining the average gray value corresponding to the dimming film region image.
4. The method according to claim 1, wherein the preset gray scale threshold is set between a first gray scale threshold and a second gray scale threshold, and the step of performing gray scale detection processing on the average gray scale value according to the preset gray scale threshold comprises:
when the average gray value is smaller than the first gray threshold or larger than the second gray threshold, determining that gray range detection is not passed, performing parameter adjustment processing on the current adaptive exposure parameters of the industrial camera based on the adaptive adjustment model and the average gray value, and re-acquiring an optical product image based on the adjusted adaptive exposure parameters, and performing gray value calculation processing and gray range detection processing.
5. The method according to claim 4, wherein the preset gray scale threshold is set between a first gray scale threshold and a second gray scale threshold, the step of performing gray scale detection processing on the average gray scale value according to the preset gray scale threshold, further comprising:
And when the average gray value is not smaller than the first gray threshold value and not larger than the second gray threshold value, determining that the gray range is detected to pass, and determining the current adaptive exposure parameter of the industrial camera as a target adaptive exposure parameter.
6. The industrial camera adaptive exposure method for a dimming film according to claim 4, wherein the adaptive exposure parameters include: the step of performing parameter adjustment processing on the current adaptive exposure parameters of the industrial camera based on the adaptive adjustment model and the average gray value comprises the following steps:
carrying out parameter adjustment processing on the self-adaptive exposure parameters in sequence according to the order of the priority from large to small, wherein the self-adaptive exposure parameters sequentially comprise light source brightness, industrial camera exposure time and industrial camera overflow according to the order of the priority from large to small;
if the parameter of the first priority is in the preset parameter threshold range corresponding to the parameter, performing parameter fine adjustment on the parameter based on the average gray value;
if the parameter of the first priority is not in the preset parameter threshold range corresponding to the parameter, parameter adjustment processing is carried out on the parameter of the next priority.
7. The industrial camera adaptive exposure method for a dimming film according to claim 6, wherein the step of parameter fine-tuning the parameter based on the average gray value comprises:
for the light source brightness, if the average gray value is smaller than a preset minimum gray value, the light source brightness is increased according to a preset adjustment threshold, and if the average gray value is larger than a preset maximum gray value, the light source brightness is decreased according to the preset adjustment threshold;
For the industrial camera exposure time, if the average gray value is smaller than a preset minimum gray value, the industrial camera exposure time is increased according to a preset adjustment threshold, and if the average gray value is larger than a preset maximum gray value, the industrial camera exposure time is reduced according to the preset adjustment threshold;
and aiming at the overflow of the industrial camera, if the average gray value is smaller than a preset minimum gray value, the overflow of the industrial camera is increased according to a preset adjustment threshold, and if the average gray value is larger than a preset maximum gray value, the overflow of the industrial camera is reduced according to the preset adjustment threshold.
8. An industrial camera adaptive exposure apparatus for a dimming film, the apparatus comprising:
The image acquisition module is used for acquiring an optical product image acquired by the industrial camera according to a preset photographing path;
The gray level calculation module is used for carrying out gray level calculation processing on the optical product image through a preset gray level calculation model, and determining a dimming film area image in the optical product image and an average gray level corresponding to the dimming film area image;
And the parameter adjusting module is used for carrying out gray scale range detection processing on the average gray scale value according to a preset gray scale range threshold value, and carrying out parameter adjustment processing on the adaptive exposure parameters corresponding to the industrial camera through the adaptive adjusting model when the gray scale range detection fails, so as to determine target adaptive exposure parameters.
9. An electronic device comprising a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method of any one of claims 1 to 7.
10. A computer readable storage medium storing computer executable instructions which, when invoked and executed by a processor, cause the processor to implement the method of any one of claims 1 to 7.
CN202410176318.9A 2024-02-08 2024-02-08 Industrial camera self-adaptive exposure method and device for dimming film and electronic equipment Pending CN118042285A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410176318.9A CN118042285A (en) 2024-02-08 2024-02-08 Industrial camera self-adaptive exposure method and device for dimming film and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410176318.9A CN118042285A (en) 2024-02-08 2024-02-08 Industrial camera self-adaptive exposure method and device for dimming film and electronic equipment

Publications (1)

Publication Number Publication Date
CN118042285A true CN118042285A (en) 2024-05-14

Family

ID=90985356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410176318.9A Pending CN118042285A (en) 2024-02-08 2024-02-08 Industrial camera self-adaptive exposure method and device for dimming film and electronic equipment

Country Status (1)

Country Link
CN (1) CN118042285A (en)

Similar Documents

Publication Publication Date Title
US10630906B2 (en) Imaging control method, electronic device and computer readable storage medium
US8849062B2 (en) Eye defect detection in international standards organization images
US9934438B2 (en) Scene recognition method and apparatus
CN113766125B (en) Focusing method and device, electronic equipment and computer readable storage medium
CN109829859B (en) Image processing method and terminal equipment
CN108198152B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN112819702B (en) Image enhancement method, image enhancement device, electronic equipment and computer readable storage medium
CN110691199A (en) Face automatic exposure method and device, shooting equipment and storage medium
WO2017206444A1 (en) Method and device for detecting imaging difference, and computer storage medium
CN111724430A (en) Image processing method and device and computer readable storage medium
CN106534677B (en) Image overexposure optimization method and device
CN111601048B (en) Image processing method and device
CN111277699B (en) Flash lamp color temperature calibration method and device, electronic equipment and readable storage medium
CN111368587B (en) Scene detection method, device, terminal equipment and computer readable storage medium
US20230276034A1 (en) Method and system for adjusting projection dithering
CN108881876B (en) Method and device for carrying out white balance processing on image and electronic equipment
CN110677558A (en) Image processing method and electronic device
CN118042285A (en) Industrial camera self-adaptive exposure method and device for dimming film and electronic equipment
CN115278103B (en) Security monitoring image compensation processing method and system based on environment perception
JP6132343B2 (en) Image processing apparatus, image processing method, and program
CN111937497A (en) Control method, control device and infrared camera
CN110710194A (en) Exposure method and device, camera module and electronic equipment
CN110910429A (en) Moving target detection method and device, storage medium and terminal equipment
CN113905194B (en) Exposure ratio processing method, terminal equipment and computer storage medium
CN113438386B (en) Dynamic and static judgment method and device applied to video processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination