CN113411512B - Industrial camera automatic exposure control method for cigarette field - Google Patents

Industrial camera automatic exposure control method for cigarette field Download PDF

Info

Publication number
CN113411512B
CN113411512B CN202110893311.5A CN202110893311A CN113411512B CN 113411512 B CN113411512 B CN 113411512B CN 202110893311 A CN202110893311 A CN 202110893311A CN 113411512 B CN113411512 B CN 113411512B
Authority
CN
China
Prior art keywords
exposure time
industrial camera
final
model
exposure
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
CN202110893311.5A
Other languages
Chinese (zh)
Other versions
CN113411512A (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.)
Hongyun Honghe Tobacco Group Co Ltd
Original Assignee
Hongyun Honghe Tobacco Group 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 Hongyun Honghe Tobacco Group Co Ltd filed Critical Hongyun Honghe Tobacco Group Co Ltd
Priority to CN202110893311.5A priority Critical patent/CN113411512B/en
Publication of CN113411512A publication Critical patent/CN113411512A/en
Application granted granted Critical
Publication of CN113411512B publication Critical patent/CN113411512B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/71Circuitry for evaluating the brightness variation
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Exposure Control For Cameras (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses an automatic exposure control method of an industrial camera in the field of cigarettes, which has the design concept that the characteristics of a photosensitive device are utilized to realize real-time detection of illumination environment change and convert the illumination environment change into an electric signal, meanwhile, an initial exposure time conversion method related to the electric signal converted by the photosensitive device is provided based on a set strategy instead of simply utilizing the electric signal converted by the photosensitive device to directly carry out exposure control, and a model of final exposure time and final gain parameters related to the initial exposure time is set by combining the use characteristics of the industrial camera in a cigarette application scene, so that control parameters for controlling the industrial camera to carry out automatic exposure are obtained. The automatic exposure mechanism provided by the invention breaks through the limitation of complex illumination conditions on a common industrial camera, effectively improves the imaging quality of the industrial camera, and further improves the detection accuracy of an industrial vision detection system.

Description

Industrial camera automatic exposure control method for cigarette field
Technical Field
The invention relates to the field of tobacco industry, in particular to an automatic exposure control method of an industrial camera in the field of cigarettes.
Background
At present, the machine vision technology is widely applied in the field of cigarette industry control, and an industrial camera is used as an image acquisition device in the realization process of the machine vision technology, and the exposure control mode of the industrial camera is generally as follows: and manually adjusting the aperture value in advance and keeping the aperture value unchanged, and then setting parameters such as an exposure value and the like by using industrial camera control software according to different scenes. When the illumination intensity in a scene changes, the normal image acquisition function can be realized after the parameters in the industrial camera control software are required to be adjusted. Specifically, the automatic exposure function of the industrial camera is to capture an image with a proper brightness level meeting the requirement of subsequent detection quality in different illumination environments, and to achieve the purpose, the automatic exposure function of the industrial camera can be realized by adjusting the size of an aperture, the exposure time of the industrial camera, the gain parameter of an imaging sensor and the like in the using process.
The existing common industrial camera with the automatic exposure function generally adopts a statistical imaging sensor to judge the intensity of light by means of quantized image gray values output before shooting, and judges overexposure or underexposure according to a preset threshold value, so that the automatic exposure function is completed by adjusting parameters such as exposure time, gain and the like of the imaging sensor, and the specific process is as follows:
the first step is as follows: carrying out brightness statistics on the current image;
the second step is that: determining an exposure value according to the brightness of the current image;
the third step: calculating new exposure parameters such as exposure time and gain;
the fourth step: applying the new exposure parameters to the camera;
the fifth step: and repeating the steps one to four until the brightness meets the requirement.
In the actual use process, the automatic exposure adjustment mode needs to involve a large amount of calculation, so that the convergence rate is low, and the use requirement of the application scene of the cigarette industry with severe illumination intensity change is difficult to meet.
Disclosure of Invention
In view of the above, the present invention aims to provide an automatic exposure control method for an industrial camera in the field of cigarettes, so as to implement automatic exposure control of a common industrial camera in a complex lighting environment, and provide a reliable solution for application of a machine vision technology in a complex lighting cigarette industrial scene.
The technical scheme adopted by the invention is as follows:
an industrial camera automatic exposure control method for the cigarette field comprises the following steps:
acquiring a voltage signal which is detected and converted in real time by a photosensitive device arranged at an industrial camera, wherein the voltage signal has a given corresponding relation with the current illumination intensity sensed by the photosensitive device;
calculating initial exposure time according to a preset exposure time base number, the voltage signal and a preset weighting coefficient value;
obtaining final exposure time and final gain parameters by utilizing a first model, a second model and the initial exposure time which are constructed in advance based on the characteristics of the industrial camera using scene; wherein the first model characterizes a relationship of a first exposure time in a direct sunlight environment, a maximum exposure time allowed by an industrial camera, and the initial exposure time; the second model represents the relationship among a preset gain median number, a preset gain adjustment coefficient, the first exposure time, the maximum exposure time and the initial exposure time;
and controlling the industrial camera to perform automatic exposure control under the current illumination intensity by using the final exposure time and the final gain parameter.
In at least one possible implementation manner, the calculation formula of the initial exposure time includes:
t=z-x*y
wherein t is the initial exposure time, z is the exposure time base, x is the voltage signal value converted by the photosensitive device, and y is the weighting coefficient value.
In at least one possible implementation manner, the manner of setting the weighting coefficient value includes: and carrying out statistical analysis on the relationship between the brightness of different pictures and the corresponding illumination intensity, and determining a weighting coefficient value for exposure control.
In at least one possible implementation manner, the first model includes:
Figure BDA0003196952050000031
wherein T is the final exposure time, T0For said first exposure time, TmaxIs the maximum exposure time.
In at least one possible implementation manner, the second model includes:
Figure BDA0003196952050000032
wherein E is the final gain parameter, A is the median gain number, and k is the gain adjustment coefficient.
The design concept of the invention is that the characteristics of a photosensitive device are utilized to realize real-time detection of illumination environment change and convert the illumination environment change into an electric signal, meanwhile, an initial exposure time conversion method related to the electric signal converted by the photosensitive device is provided based on a set strategy instead of simply utilizing the electric signal converted by the photosensitive device to directly perform exposure control, and a model of final exposure time and final gain parameters related to the initial exposure time is set by combining the use characteristics of an industrial camera in a cigarette application scene, so that control parameters for controlling the industrial camera to implement automatic exposure are obtained. The automatic exposure mechanism provided by the invention breaks through the limitation of complex illumination conditions on a common industrial camera, effectively improves the imaging quality of the industrial camera, and further improves the detection accuracy of an industrial vision detection system.
Drawings
To make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described with reference to the accompanying drawings, in which:
fig. 1 is a flowchart of an automatic exposure control method for an industrial camera used in the field of cigarettes according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
The invention provides an embodiment of an industrial camera automatic exposure control method used in the field of cigarettes, and specifically, as shown in fig. 1, the method may include:
step S1, acquiring a voltage signal which is detected and converted by a photosensitive device arranged at an industrial camera in real time, wherein the voltage signal and the current illumination intensity sensed by the photosensitive device have a set corresponding relation;
step S2, calculating initial exposure time according to a preset exposure time base number, the voltage signal and a preset weighting coefficient value;
step S3, obtaining final exposure time and final gain parameters by utilizing a first model, a second model and the initial exposure time which are constructed in advance based on the characteristics of the industrial camera using scene; wherein the first model characterizes a relationship of a first exposure time in a direct sunlight environment, a maximum exposure time allowed by an industrial camera, and the initial exposure time; the second model represents the relationship among a preset gain median number, a preset gain adjustment coefficient, the first exposure time, the maximum exposure time and the initial exposure time;
and step S4, controlling the industrial camera to perform automatic exposure control under the current illumination intensity by using the final exposure time and the final gain parameter.
Further, the calculation formula of the initial exposure time includes:
t=z-x*y
wherein t is the initial exposure time, z is the exposure time base, x is the voltage signal value converted by the photosensitive device, and y is the weighting coefficient value.
Further, the manner of setting the weighting coefficient value includes: and carrying out statistical analysis on the relationship between the brightness of different pictures and the corresponding illumination intensity, and determining a weighting coefficient value for exposure control.
Further, the first model comprises:
Figure BDA0003196952050000041
wherein T is the final exposure time, T0For said first exposure time, TmaxIs the maximum exposure time.
Further, the second model comprises:
Figure BDA0003196952050000051
wherein E is the final gain parameter, A is the median gain number, and k is the gain adjustment coefficient.
To facilitate an understanding of the embodiments and their preferred versions, the following specific description is provided:
the method comprises the steps that a photosensitive device is used for converting the illumination intensity of the current shooting environment into an electric signal in real time and transmitting the electric signal to a controller for processing, the controller establishes a model by using the converted electric signal, exposure time and imaging sensor gain, required exposure control parameters are output through model processing and transmitted to an industrial camera through an industrial communication mode, and the industrial camera realizes an automatic exposure function according to the received exposure control parameters.
Specifically, a linear light sensor (e.g., photosensor, photovoltaic panel, etc.) can be used to convert the ambient illumination intensity into a voltage signal and send the voltage signal to the PLC via its analog module.
Because the illumination intensity and the output voltage of the linear photosensitive sensor are in a positive correlation linear relationship, and the exposure time and the illumination intensity are in a negative correlation linear relationship, in order to ensure that the industrial camera can be normally exposed under different illumination conditions, the invention considers that the voltage data output by the linear photosensitive sensor cannot be directly used, and a model needs to be constructed for realization. After a plurality of test tests, the relation between the brightness and the illumination intensity of different images in mass is statistically analyzed, the weighting coefficient value of the exposure value is obtained, and the exposure time conversion relation is constructed, and the method comprises the following steps:
t=z-x*y
where t is the initial exposure time, x is the photosensor output voltage, y is the weighting coefficient value, and z is the pre-set exposure time base value (which may be determined in conjunction with the industrial camera used).
To ensure that the shortest exposure time of the industrial camera is greater than or equal to 0 and the longest exposure time is not greater than the preset maximum exposure time of the industrial camera in the application scene (for example, in some industrial scenes, the shot object is moving, and the picture shot by the industrial camera will be unclear if the exposure time is too long), the following first model and second model are established in advance to control the exposure parameters of the industrial camera:
Figure BDA0003196952050000061
Figure BDA0003196952050000062
in the first model, T is the final exposure time of the industrial camera, T0The exposure time, T, of the industrial camera in the environment with the light intensity when the sunlight is directly irradiated (such as at noon)maxPresetting maximum exposure time for an industrial camera combined with an actual production scene, wherein t is initial exposure time; and in the second model, E is the final gain parameter of the industrial camera, A is the median number of the gain parameter, and k is the adjustment coefficient of the gain parameter。
Therefore, each time the industrial camera is started to take a picture, the PLC may calculate the final exposure time T and the final gain parameter E of the industrial camera according to the currently acquired photoelectric conversion signal (preferably, the PLC may also calculate the final exposure time T and the final gain parameter E according to an image signal acquired by the current camera, such as but not limited to image information captured by a lens before taking a picture), and then transmit the final exposure time T and the final gain parameter E to a control module of the industrial camera through a method such as a profinet network, so as to control the industrial camera to realize automatic exposure.
In summary, the design concept of the present invention is to utilize the characteristics of the photosensitive device to realize real-time detection of the change of the illumination environment and convert the change into an electrical signal, and at the same time, to provide an initial exposure time conversion method related to the electrical signal converted by the photosensitive device based on a predetermined strategy, instead of simply utilizing the electrical signal converted by the photosensitive device to directly perform exposure control, and then to combine the usage characteristics of the industrial camera in the application scene of the cigarette, to set a model of the final exposure time and the final gain parameter related to the initial exposure time, thereby obtaining the control parameter for controlling the industrial camera to implement automatic exposure. The automatic exposure mechanism provided by the invention breaks through the limitation of complex illumination conditions on a common industrial camera, effectively improves the imaging quality of the industrial camera, and further improves the detection accuracy of an industrial vision detection system.
In the embodiments of the present invention, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, and means that there may be three relationships, for example, a and/or B, and may mean that a exists alone, a and B exist simultaneously, and B exists alone. Wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, wherein a, b and c can be single or multiple.
The structure, features and effects of the present invention have been described in detail with reference to the embodiments shown in the drawings, but the above embodiments are merely preferred embodiments of the present invention, and it should be understood that technical features related to the above embodiments and preferred modes thereof can be reasonably combined and configured into various equivalent schemes by those skilled in the art without departing from and changing the design idea and technical effects of the present invention; therefore, the invention is not limited to the embodiments shown in the drawings, and all the modifications and equivalent embodiments that can be made according to the idea of the invention are within the scope of the invention as long as they are not beyond the spirit of the description and the drawings.

Claims (2)

1. An industrial camera automatic exposure control method for the cigarette field is characterized by comprising the following steps:
acquiring a voltage signal which is detected and converted in real time by a photosensitive device arranged at an industrial camera, wherein the voltage signal has a given corresponding relation with the current illumination intensity sensed by the photosensitive device;
calculating initial exposure time according to a preset exposure time base number, the voltage signal and a preset weighting coefficient value;
obtaining final exposure time and final gain parameters by utilizing a first model, a second model and the initial exposure time which are constructed in advance based on the characteristics of the industrial camera using scene; wherein the first model characterizes a relationship of a first exposure time in a direct sunlight environment, a maximum exposure time allowed by an industrial camera, and the initial exposure time; the second model represents the relationship among a preset gain median number, a preset gain adjustment coefficient, the first exposure time, the maximum exposure time and the initial exposure time;
controlling the industrial camera to perform automatic exposure control under the current illumination intensity by utilizing the final exposure time and the final gain parameter;
the calculation formula of the initial exposure time comprises:
t=z-x*y
wherein t is initial exposure time, z is an exposure time base number, x is a voltage signal value converted by the photosensitive device, and y is a weighting coefficient value;
the first model includes:
Figure FDA0003622565120000011
wherein T is the final exposure time, T0For said first exposure time, TmaxIs the maximum exposure time;
the second model includes:
Figure FDA0003622565120000012
wherein E is the final gain parameter, A is the median gain number, and k is the gain adjustment coefficient.
2. The automatic exposure control method for industrial cameras in the field of cigarettes according to claim 1, wherein the manner of setting the weighting coefficient values includes: and carrying out statistical analysis on the relationship between the brightness of different pictures and the corresponding illumination intensity, and determining a weighting coefficient value for exposure control.
CN202110893311.5A 2021-08-04 2021-08-04 Industrial camera automatic exposure control method for cigarette field Active CN113411512B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110893311.5A CN113411512B (en) 2021-08-04 2021-08-04 Industrial camera automatic exposure control method for cigarette field

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110893311.5A CN113411512B (en) 2021-08-04 2021-08-04 Industrial camera automatic exposure control method for cigarette field

Publications (2)

Publication Number Publication Date
CN113411512A CN113411512A (en) 2021-09-17
CN113411512B true CN113411512B (en) 2022-06-24

Family

ID=77688394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110893311.5A Active CN113411512B (en) 2021-08-04 2021-08-04 Industrial camera automatic exposure control method for cigarette field

Country Status (1)

Country Link
CN (1) CN113411512B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301619A (en) * 2014-02-24 2015-01-21 凯迈(洛阳)测控有限公司 Fast camera exposure time automatic adjusting method and device
CN113259599A (en) * 2021-05-08 2021-08-13 珠海六点智能科技有限公司 Automatic exposure photographing method for fundus image, fundus camera and electronic equipment
CN113992863A (en) * 2021-12-28 2022-01-28 北京的卢深视科技有限公司 Automatic exposure method, device, electronic equipment and computer readable storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4049058B2 (en) * 2003-08-29 2008-02-20 カシオ計算機株式会社 Imaging apparatus and program thereof
CN101359148B (en) * 2007-08-03 2011-04-06 深圳艾科创新微电子有限公司 Method for automatic exposure regulation and control system
CN105872398A (en) * 2016-04-19 2016-08-17 大连海事大学 Space camera self-adaption exposure method
US10630901B2 (en) * 2017-05-23 2020-04-21 Google Llc Systems and methods for selectively activating high dynamic range in a video capture system
CN110121882B (en) * 2017-10-13 2020-09-08 华为技术有限公司 Image processing method and device
US20200036882A1 (en) * 2018-07-26 2020-01-30 Qualcomm Incorporated Faster automatic exposure control system
CN109361866B (en) * 2018-11-21 2021-03-02 豪威科技(上海)有限公司 Automatic exposure control method and system
CN113132588B (en) * 2020-01-15 2022-09-27 思特威(上海)电子科技股份有限公司 Method for quickly starting imaging system and imaging system using same
CN112788250B (en) * 2021-02-01 2022-06-17 青岛海泰新光科技股份有限公司 Automatic exposure control method based on FPGA

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301619A (en) * 2014-02-24 2015-01-21 凯迈(洛阳)测控有限公司 Fast camera exposure time automatic adjusting method and device
CN113259599A (en) * 2021-05-08 2021-08-13 珠海六点智能科技有限公司 Automatic exposure photographing method for fundus image, fundus camera and electronic equipment
CN113992863A (en) * 2021-12-28 2022-01-28 北京的卢深视科技有限公司 Automatic exposure method, device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN113411512A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
CN110769164B (en) Method for automatically adjusting illumination level of target scene
US11323677B2 (en) White balance adjustment method and apparatus, camera and medium
US7800669B2 (en) System and method for image sensor element or array with photometric and realtime reporting capabilities
CN102104785B (en) Image pickup apparatus and controlling method thereof
EP3614661A1 (en) Image processing method, image processing apparatus, electronic device and storage medium
CN109729332B (en) Automatic white balance correction method and system
CN112118388B (en) Image processing method, image processing device, computer equipment and storage medium
EP1615428A1 (en) Method and apparatus for adjusting exposure for a camera in a mobile phone
TW201106685A (en) Foreground image separation method
CN102472950B (en) Image pickup apparatus and mobile phone equipped therewith
CN103167244A (en) Portable electronic device with a camera function, and image capturing method with auto exposure control
CN107995396B (en) Two camera modules and terminal
CN101911715A (en) The white balance calibration that is used for digital camera device
CN110213502A (en) Image processing method, device, storage medium and electronic equipment
CN107835351B (en) Two camera modules and terminal
CN114697628A (en) Image acquisition method, apparatus, device, and medium
CN113411512B (en) Industrial camera automatic exposure control method for cigarette field
CN103428522B (en) Method for improving image quality at low illumination level of web camera
CN115967861B (en) Image processing method and device
US20230045128A1 (en) Method and system for establishing light source information prediction model
CN115499604B (en) Image sensor, image processing method, depth camera, and storage medium
US8218046B1 (en) Monochrome/color dual-slope traffic camera system
CN108551555B (en) Automatic exposure method of industrial camera using CMOS detector
CN112702588B (en) Dual-mode image signal processor and dual-mode image signal processing system
CN112055154A (en) Control method of camera device, camera device 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