Industrial camera asynchronous multi-ROI shooting method
By adopting the asynchronous multi-ROI shooting method in industrial cameras, the problem of traditional industrial cameras that need to stop shooting when switching ROI parameters is solved, and the rapid switching of ROI parameters and multi-region data acquisition are realized, which improves work efficiency.
Patent Information
- Application Number
- CN202510124738.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2045-01-26
AI Technical Summary
Traditional industrial cameras need to stop shooting and restart video streams when switching ROI parameters, resulting in production continuity affecting and inconvenience to industrial use.
The asynchronous multi-ROI shooting method of industrial cameras allows switching and execution of multiple ROI parameters without stopping shooting, and selecting and switching ROI data through manual or automatic means.
It realizes rapid switching of ROI parameters and multi-region data acquisition, improves work efficiency and avoids production interruptions caused by stopping shooting in traditional methods.
Smart Images

Figure CN119562162A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ROI setting of industrial cameras, and in particular to an asynchronous multi-ROI shooting method of industrial cameras. Background Art
[0002] The ROI function, also known as AOI in some industries, refers to the region of interest in an image relative to the full-frame resolution. The ROI function of an industrial camera has four parameters, namely, lateral (horizontal) offset, longitudinal (vertical) deviation, width, and height. The units of the four parameters are the number of pixels, indicating how many pixels are offset in the horizontal direction to intercept the specified number of pixels (width); how many pixels are offset in the vertical direction to intercept the specified number of pixels (height), thereby extracting the pixels of interest in a rectangular area. In many application scenarios in the visual industry, within the field of view requirements, the visual inspection system only needs to extract, identify, and detect part of the target image without caring about other areas of the image.
[0003] In the existing traditional industrial camera usage method, the design of the ROI function requires stopping shooting to switch the ROI parameters, that is, it is necessary to cooperate with the entire visual acquisition system to stop the video stream and restart the video stream operation to complete the ROI switch. However, industrial production needs to be carried out continuously, and industrial cameras need to stop shooting every time to switch the ROI parameters, which brings great inconvenience to industrial use. Summary of the invention
[0004] The purpose of the present invention is to solve the above-mentioned related problems and design an asynchronous multi-ROI shooting method for industrial cameras. To achieve the above-mentioned purpose, the present invention provides the following solutions: An asynchronous multi-ROI shooting method for an industrial camera comprises the following steps: S1. Select manual or automatic working mode of the industrial camera; when the automatic working mode of the industrial camera is selected, select automatic ROI switching mode or conditional ROI switching mode; S2. Setting industrial camera shooting parameters and one or more groups of ROI data; each group of ROI data includes one or more ROI parameters; S3 capture images; in response to the manual working mode or the automatic working mode to execute the ROI data; S4. Determine whether the shooting stop condition is met, and if so, stop shooting.
[0005] As a further improvement of the technical solution, each ROI parameter includes horizontal offset pixels, vertical offset pixels, width pixels, and height pixels.
[0006] As a further improvement of the technical solution, in response to the automatic working mode of the industrial camera, when the automatic ROI switching mode is selected, each group of ROIs automatically executes the next group of ROI data according to the set switching conditions when the switching conditions are met, otherwise, the group of ROI data continues to be executed for shooting.
[0007] As a further improvement of the technical solution, the switching condition is to detect the target object marked by the ROI, and the switching condition is considered to be satisfied if the detection passes.
[0008] As a further improvement of the technical solution, in response to the automatic working mode of the industrial camera, when the automatic ROI switching mode is selected, each group of ROI automatically executes the next group of ROI after reaching the set number of shooting frames. As a further improvement of the technical solution, in response to the manual working mode of the industrial camera, after the camera starts to capture images, ROI data is not applied; during the capture process, a certain set of ROI data to be applied is manually selected and manually triggered; the industrial camera captures images according to the selected set of ROI data; after the trigger is manually turned off, the industrial camera cancels the ROI data and continues to capture.
[0009] As a further improvement of the technical solution, in response to the automatic working mode of the industrial camera, after each set of ROI data is automatically executed, it is determined that the stop shooting condition is met and the shooting is ended.
[0010] As a further improvement of the technical solution, in response to the manual working mode of the industrial camera, when a stop shooting instruction is manually issued, it is determined that the stop shooting condition is met and the shooting is ended.
[0011] As a further improvement of the technical solution, during the operation of the industrial camera, unexecuted ROI data can be modified; new ROI data can be added; executed ROI data can be modified; when the industrial camera is in automatic working mode, modifying the executed ROI data is regarded as adding a new set of ROI data.
[0012] A shooting system using an asynchronous multi-ROI shooting method of an industrial camera, comprising: Input module, used to input shooting parameters, ROI parameters, shooting work, trigger commands, and add and modify ROI parameters; The ROI execution judgment module is used to execute the ROI data and judge whether to switch the ROI data; The shooting module is used to collect images. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Various other advantages and benefits will become apparent to those skilled in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention; Figure 1 A schematic diagram of a process flow of an asynchronous multi-ROI shooting method for an industrial camera of the present invention; Figure 2 An example diagram of ROI displayed by an industrial camera of the present invention using a video captured by an asynchronous multi-ROI shooting method for an industrial camera; Figure 3 The present invention is a structural schematic diagram of a shooting system using an asynchronous multi-ROI shooting method of an industrial camera. DETAILED DESCRIPTION
[0014] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0015] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0016] The present invention will be described in detail below in conjunction with the accompanying drawings.
[0017] Example 1 like Figure 1 and Figure 2 shown.
[0018] Select the manual working mode of the industrial camera, set and then input three groups of ROI data as needed. The first group of ROI data has 3 ROI parameters, including horizontal offset pixel OfferX11, vertical offset pixel OfferY11, width pixel W11, height pixel W11; the second ROI parameter includes horizontal offset pixel OfferX12, vertical offset pixel OfferY12, width pixel W12, height pixel W12; the third ROI parameter includes horizontal offset pixel OfferX13, vertical offset pixel OfferY13, width pixel W13, height pixel W13. There is 1 ROI parameter in the second group of ROI data, and 2 ROI parameters in the third group of ROI data, each parameter includes horizontal offset pixel, vertical offset pixel, width pixel and height pixel.
[0019] The user issues a start shooting command, and the camera starts shooting. However, the camera does not execute any set of ROI data at this time. The user chooses to execute the third set of ROI data at time t1 as needed, and marks the range of the two ROI parameters in the image captured by the industrial camera according to the two ROI parameters in the third set of ROI data. When the parameter is captured at time t1', the user chooses to stop executing this set of ROI data, and the camera continues to shoot, but does not execute any ROI data. At time t2, the user chooses to execute the second set of ROI data, and the range of the 1 ROI parameter is marked in the image captured by the industrial camera. In the process of executing the second set of ROI data, the user modifies the third ROI parameter in the first set of ROI data as needed, changes the horizontal offset pixel OfferX13 of the third ROI parameter to OfferX13', changes the width pixel W13 to W13', and also adds a fourth set of ROI data, which includes 5 ROI parameters. At time t3, the user chooses to switch the second set of ROI data to the fourth set of ROI data. At time t4, the user chooses to switch the fourth set of ROI data to the first set of ROI data. At time t5, the user switches the first set of ROI data to the second set of ROI data. At time t6, the user issues a stop command, and the industrial camera stops shooting.
[0020] Example 2 like Figure 1 and Figure 2 shown.
[0021] Select the automatic working mode of the industrial camera; after selecting the automatic mode, further select the automatic ROI switching mode. The user sets five groups of ROI data according to the needs. The first group of ROI data contains 5 ROI parameters, the second group of ROI data contains 3 ROI parameters, the third group of ROI data contains 2 ROI parameters, the fourth group of ROI data contains 4 ROI parameters, and the fifth group of ROI data contains 1 ROI parameter. Set the first group of ROI data to collect 80 frames of images, the second group of ROI data to collect 60 frames of images, the third group of ROI data to collect 10 seconds of images, the fourth group of ROI data to collect 1 minute of images, and the fifth group of ROI data to collect 30 seconds of images. At the same time, set the industrial camera to stop running after all five groups of ROI data are executed.
[0022] The user issues a start shooting command, and the camera starts shooting. After shooting starts, the first set of ROI data is executed. After collecting 80 frames of images, the second set of ROI data is automatically switched. Each set of ROI data is executed in turn according to the set image acquisition frame number or time, until the last set of ROI data is executed, and the industrial camera stops working.
[0023] Example 3 like Figure 1 and Figure 2 shown.
[0024] Select the automatic working mode of the industrial camera; after selecting the automatic mode, further select the conditional ROI switching mode. The user sets two sets of ROI data and connects the images collected by the industrial camera to the image recognition system, which is used to detect the surface quality of the product in the ROI marked area. The user issues a start shooting command, and the industrial camera starts shooting. After starting shooting, the first set of ROI data is executed. The image detection system performs image recognition detection on the ROI marked area in each frame of the picture taken by the industrial camera. If the product surface quality is qualified, the second set of ROI data is executed. If the product surface quality is unqualified, the working line stops, the industrial camera keeps the current ROI data, and issues an alarm to the user.
[0025] Example 4 like Figure 3 shown.
[0026] A shooting system using an asynchronous multi-ROI shooting method of an industrial camera, comprising: The input module is used to input shooting parameters, ROI parameters, shooting operations, trigger commands, and add and modify ROI parameters. The user enters the various shooting parameters required for industrial camera shooting in the input module. Select the manual or automatic working mode of the industrial camera; when the automatic working mode of the industrial camera is selected, select the automatic ROI switching mode or the conditional ROI switching mode. Set one or more groups of ROI data. During the operation of the industrial camera, the unexecuted ROI data can be modified through the input module; new ROI data can be added; the executed ROI data can be modified; when the industrial camera is in automatic working mode, modifying the executed ROI data is regarded as adding a new set of ROI data.
[0027] The ROI execution judgment module is used to execute ROI data and judge whether to switch ROI data. In response to the manual working mode of the industrial camera, after the camera starts to shoot images, ROI data is not applied; during the shooting process, a certain set of ROI data to be applied is manually selected and manually triggered, and the ROI execution judgment module executes the set of ROI data; the industrial camera shoots images according to the selected set of ROI data; after the trigger is manually turned off, the industrial camera cancels the ROI data and continues shooting.
[0028] In response to the automatic working mode of the industrial camera, when the automatic ROI switching mode is selected, each group of ROIs automatically executes the next group of ROI data when the switching condition is met according to the set switching condition, otherwise, the group of ROI data continues to be executed for shooting. The switching condition is to detect the target object marked by the ROI, and the detection is considered to meet the switching condition.
[0029] In response to the automatic working mode of the industrial camera, when the automatic ROI switching mode is selected, the ROI execution judgment module automatically executes the next group of ROIs after each group of ROIs reaches the set number of shooting frames.
[0030] After the ROI execution judgment module determines that the stop shooting condition is met, the industrial camera stops shooting.
[0031] The shooting module is used to collect images.
[0032] In summary, the present invention proposes an asynchronous multi-ROI shooting method for industrial cameras. The invention optimizes and improves the time consumption of the ROI function of traditional industrial cameras and the lack of freedom of the ROI function of industrial cameras customized for industry applications, while satisfying the freedom of the ROI function and optimizing the time consumption performance. Under any degree of freedom of the ROI function, it is possible to switch ROI more quickly. The specific time consumption depends on the time consumption of setting the ROI of different image sensors themselves. There is no additional communication operation time consumption, and only the time consumption of the sensor setting the ROI parameters is included. In addition, it only takes one frame to obtain data from multiple different areas, which solves the problem that only a single ROI can be obtained in one frame. In the same application scenario, work efficiency is greatly improved.
Claims
1. An asynchronous multi-ROI shooting method for an industrial camera, characterized in that: The following steps are involved: S1. Select manual or automatic working mode of the industrial camera; when the automatic working mode of the industrial camera is selected, select automatic ROI switching mode or conditional ROI switching mode; S2. Setting industrial camera shooting parameters and one or more groups of ROI data; each group of ROI data includes one or more ROI parameters; S3 capture images; in response to the manual working mode or the automatic working mode to execute the ROI data; S4. Determine whether the shooting stop condition is met, and if so, stop shooting.
2. The asynchronous multi-ROI shooting method of an industrial camera according to claim 1, characterized in that: Each of the ROI parameters includes horizontal offset pixels, vertical offset pixels, width pixels, and height pixels.
3. The asynchronous multi-ROI shooting method of an industrial camera according to claim 1, characterized in that: In response to the automatic working mode of the industrial camera, when the automatic ROI switching mode is selected, each group of ROI data automatically executes the next group of ROI data according to the set switching conditions when the switching conditions are met, otherwise, the group of ROI data continues to be executed for shooting.
4. The asynchronous multi-ROI shooting method of an industrial camera according to claim 3, characterized in that: The switching condition is to detect the target object marked by the ROI, and the switching condition is considered to be satisfied if the detection passes.
5. The asynchronous multi-ROI shooting method of an industrial camera according to claim 1, characterized in that: In response to the automatic working mode of the industrial camera, when the automatic ROI switching mode is selected, each set of ROI data automatically executes the next set of ROI data after reaching the set number of shooting frames.
6. The asynchronous multi-ROI shooting method of an industrial camera according to claim 1, characterized in that: In response to the manual working mode of the industrial camera, after the camera starts to capture images, ROI data is not applied; during the capture process, a certain set of ROI data to be applied is manually selected and manually triggered; the industrial camera captures images according to the selected set of ROI data; after the trigger is manually turned off, the industrial camera cancels the ROI data and continues to capture.
7. The asynchronous multi-ROI shooting method of an industrial camera according to claim 1, characterized in that: In response to the automatic working mode of the industrial camera, after each set of ROI data is automatically executed, it is determined that the stop shooting condition is met and the shooting is ended.
8. The asynchronous multi-ROI shooting method of an industrial camera according to claim 1, characterized in that: In response to the manual working mode of the industrial camera, when a stop shooting instruction is manually issued, it is determined that the stop shooting condition is met and the shooting is ended.
9. The asynchronous multi-ROI shooting method of an industrial camera according to claim 1, characterized in that: During the operation of the industrial camera, unexecuted ROI data can be modified; new ROI data can be added; and executed ROI data can be modified. When the industrial camera is in automatic operation mode, modifying the executed ROI data is regarded as adding a new set of ROI data.
10. A shooting system using the asynchronous multi-ROI shooting method for an industrial camera as claimed in any one of claims 1 to 9, characterized in that: include: Input module, used to input shooting parameters, ROI data, shooting work, trigger commands, and add and modify ROI data; The ROI execution judgment module is used to execute the ROI data and judge whether to switch the ROI data; The shooting module is used to collect images.
Citation Information
Patent Citations
Dynamic region of interest adaptation and image capture device providing same
CN103581544A
Shooting control method and device and computer readable storage medium
CN111263072A
Inspection method and device for movable platform, movable platform and storage medium
CN113273173A
Camera intelligent adjustment method and system
CN117768784A