CN111866499B - Center correction method for binocular camera image - Google Patents

Center correction method for binocular camera image Download PDF

Info

Publication number
CN111866499B
CN111866499B CN202010736424.XA CN202010736424A CN111866499B CN 111866499 B CN111866499 B CN 111866499B CN 202010736424 A CN202010736424 A CN 202010736424A CN 111866499 B CN111866499 B CN 111866499B
Authority
CN
China
Prior art keywords
camera
correction
center
binocular camera
image
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
CN202010736424.XA
Other languages
Chinese (zh)
Other versions
CN111866499A (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.)
Beiyuan Technology Shenzhen Co ltd
Original Assignee
Beiyuan Technology Shenzhen 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 Beiyuan Technology Shenzhen Co ltd filed Critical Beiyuan Technology Shenzhen Co ltd
Priority to CN202010736424.XA priority Critical patent/CN111866499B/en
Publication of CN111866499A publication Critical patent/CN111866499A/en
Application granted granted Critical
Publication of CN111866499B publication Critical patent/CN111866499B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras

Abstract

The invention belongs to the field of cameras, and relates to a center correction method of a binocular camera image, which comprises the following steps: s1: connecting a binocular camera module, respectively importing the shooting pictures of two cameras of the binocular camera module, and generating a calibration reference range frame in the center of a display picture; s2: setting a background plate, and setting a correction reference mark in the center of the background plate; s3: respectively positioning the reference marks in the calibration reference range frames in the two camera shots; s4: judging whether reference marks in shot pictures of two cameras of the binocular camera module meet requirements or not; s5: starting to correct; s6: and finishing the correction and storing the correction result. The method has the advantages that the center correction algorithm is directly matched with a camera module firmware program, the center is visually and automatically corrected on line, correction result parameters are stored in the camera, the center of a picture output by the binocular camera module is ensured to be consistent, and the production efficiency, precision and consistency of the camera module are improved.

Description

Center correction method for binocular camera image
Technical Field
The invention belongs to the field of cameras, and relates to a center correction method for images of a binocular camera.
Background
With the development of the technology, the face recognition gate is widely applied, and the face recognition gate consists of two parts: face identification floodgate aircraft nose and floodgate machine. The face identification floodgate machine is with the different place of exclusive use floodgate machine, except can punching the card, two-dimensional code switch-on, can also do face identification (brush face) switch-on, not only promotes the experience of business turn over and feels, still more promotes the security degree, and present face identification floodgate machine mainly adopts two mesh camera modules to carry out face identification.
Binocular camera module structure is through anthropomorphic dummy's eyes position and function, including controlling two cameras. Sorting by functional means: the color camera and the black-and-white camera are used in the field of face recognition, and the double color camera or the double black-and-white camera is used in the field of 3D application. When the binocular camera module is applied to a product, the center of the picture of two cameras is consistent, the actual camera module is very easy to generate mechanical or physical center point deviation in the production process, the deviation of the center point of the finally output image is large, great resource pressure is caused to the application of the rear end, because the center point correction needs to be processed, a software algorithm needs to call partial hardware resources for processing, and the efficiency and the difficulty are not perfect enough. Therefore, the terminal can have the precision requirement to camera module manufacture factory, and most camera manufacture factory practice is that the manual work is gone to the mobile lens center of people and is rectified, takes long time, and the precision uniformity can not obtain guaranteeing at present, finally leads to the yield low, and production efficiency is poor.
Disclosure of Invention
The invention aims to provide a center correction method of a binocular camera image, which aims to overcome the defects of the prior art, utilizes a center correction algorithm to directly cooperate with a camera module firmware program, performs online visual and automatic center correction, stores correction result parameters in a camera, ensures the centers of pictures output by a binocular camera module to be consistent, and improves the production efficiency, precision and consistency of the camera module.
In order to achieve the purpose, the invention adopts the following technical scheme:
a center correction method of a binocular camera image comprises the following steps:
s1: connecting a binocular camera module to a system platform, respectively importing the shot pictures of two cameras of the binocular camera module, selecting partial areas in the shot pictures as display pictures, and generating a calibration reference range frame in the center of the display pictures;
s2: setting a background plate, and setting a correction reference mark in the center of the background plate;
s3: finely adjusting the angle of the binocular camera module or moving the background plate to enable the correction reference marks to be respectively located in the calibration reference range frames in the two camera shooting pictures of the binocular camera module;
s4: judging whether the correction reference marks in the shot pictures of the two cameras of the binocular camera module meet the requirements or not, if so, executing step S6, and if not, executing step S5;
s5: setting a display picture of one camera to be in a fixed state, setting a display picture of the other camera to be in an unlocked state, defining the camera with the display picture set to be in the fixed state as a first camera, and defining the camera with the display picture set to be in the unlocked state as a second camera;
acquiring an image of each frame of a second camera, defining a correction reference mark in the image acquired at the moment as a first central point, moving a plurality of pixel units of the image of the second camera in the vertical and horizontal directions respectively, and defining the correction reference mark in the image acquired at the moment as a second central point;
determining the unit pixel movement distance and the unit pixel movement direction of the correction reference mark in the horizontal and vertical directions in the second camera calibration reference range frame through the first center point and the second center point, and moving the image in the second camera area to enable the center point of the first camera to be consistent with the center point of the second camera;
acquiring coordinates of the center points of the first camera and the second camera when the center point of the first camera is consistent with the center point of the second camera, calculating a coordinate difference value between the center point of the first camera and the center point of the second camera, correcting, and repeating the step S4;
s6: storing the result and finishing the correction;
the sequence of step S1 and step S2 is not sequential.
Further, the first central point or the second central point obtaining process further includes the steps of:
calculating and acquiring brightness data of a certain frame of image in the video stream;
carrying out median filtering and threshold value conversion processing on the brightness data of the obtained frame image to obtain a binary image;
performing convolution calculation on the binary image to obtain an edge intensity distribution map;
and respectively obtaining horizontal and vertical edge peak values by using weight calculation, wherein the obtained horizontal edge peak value and the obtained vertical edge peak value are the coordinates of the first central point or the second central point.
Further, in step S1: the background plate is completely white, and the correction reference mark is a black cross figure.
Furthermore, the state that the correction result meets the requirements is that, in two camera display images of the binocular camera module, calibration reference marks in the two camera display images are located at the same position in calibration reference range frames in respective images.
Further, the calibration reference range box is comprised of a plurality of equally spaced square grids.
Furthermore, the display pictures of the two cameras of the binocular camera module are located in two area positions of the same display interface.
The invention has the beneficial effects that:
at binocular camera module production end, utilize the center algorithm of rectifying to directly cooperate camera module firmware program, online visual and automatic correction center, and directly save the correction result to the camera memory area, eliminate the great skew error of the picture central point production of colour and infrared camera, the picture center of satisfying colour and black and white camera is unanimous, make the people's face algorithm can accurately compare and output the result of high accuracy with the people's face, thereby avoid because the low efficiency of a large amount of time and during operation of spending when manual adjustment, not only improved the efficiency of camera module production by a wide margin, precision and uniformity, more made things convenient for rear end application or algorithm greatly, save more resources and be used for other function development.
Drawings
FIG. 1 is a general flow diagram of the present invention;
FIG. 2 is a schematic flow chart of the present invention during the center calibration;
FIG. 3 is a schematic flow chart of the operation of the main thread and the sub-thread of the software in the present invention;
FIG. 4 is a schematic diagram of a process of acquiring a first center point or a second center point according to the present invention;
FIG. 5 is a schematic flow chart of the information of the binocular camera module configured by the computer according to the present invention;
FIG. 6 is a schematic flow chart of the software configuration of binocular camera module equipment information according to the present invention;
FIG. 7 is a schematic diagram of the binocular camera module of the present invention when the positions of the calibration reference marks are consistent;
FIG. 8 is a schematic diagram of the binocular camera module of the present invention when the positions of the calibration reference marks are not consistent;
fig. 9 is a schematic view of a background plate 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 or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
Referring to fig. 1 to 9, a center correction method of a binocular camera image includes the following steps:
s1: connecting a binocular camera module to a system platform, respectively importing the shooting pictures of two cameras of the binocular camera module, selecting partial areas in the shooting pictures as display pictures, and generating a calibration reference range frame in the center of the display pictures, wherein the system platform is a computer, an embedded android or a Linux platform;
s2: setting a background plate, and setting a correction reference mark in the center of the background plate;
s3: finely adjusting the angle of the binocular camera module or moving the background plate to enable the correction reference marks to be respectively located in the calibration reference range frames in the two camera shooting pictures of the binocular camera module;
s4: judging whether the correction reference marks in the shot pictures of the two cameras of the binocular camera module meet the requirements or not, if so, executing step S6, and if not, executing step S5;
s5: setting a display picture of one camera to be in a fixed state, setting a display picture of the other camera to be in an unlocked state, defining the camera with the display picture set to be in the fixed state as a first camera, and defining the camera with the display picture set to be in the unlocked state as a second camera;
acquiring an image of each frame of a second camera, defining a correction reference mark in the image acquired at the moment as a first central point, moving a plurality of pixel units of the image of the second camera in the vertical and horizontal directions respectively, and defining the correction reference mark in the image acquired at the moment as a second central point;
determining the unit pixel movement distance and the unit pixel movement direction of the correction reference mark in the horizontal and vertical directions in the second camera calibration reference range frame through the first center point and the second center point, and moving the image in the second camera area to enable the center point of the first camera to be consistent with the center point of the second camera;
acquiring coordinates of the center points of the first camera and the second camera when the center point of the first camera is consistent with the center point of the second camera, calculating a coordinate difference value between the center point of the first camera and the center point of the second camera, correcting, and repeating the step S4;
s6: storing the result and finishing the correction, wherein the correction result is stored in a storage device of the binocular camera module;
the sequence of step S1 and step S2 is not sequential.
In the above embodiment, the first camera is a black-and-white camera, and the second camera is a color camera; in other embodiments, the first camera may also be a color camera, the second camera may also be a black-and-white camera, or both the first camera and the second camera are color and both the first camera and the second camera are black-and-white.
In the above embodiment, the process of obtaining the first central point or the second central point further includes the following steps: acquiring a frame of image from a video stream, and converting the acquired frame of image into 24-bit RGB888 in a bmp format, wherein each pixel R (R) G (G) B of a black-and-white camera; luminance data of one frame image obtained using the RGB luminance conversion formula Y ═ 0.2 × R +0.6 × G +0.1 × B is obtained as luminance data RAW8 in the present embodiment; performing median filtering and threshold conversion on the brightness data of the obtained frame image to obtain a binary image, performing 3X3 matrix median filtering on a RAW8 picture when the binary image is obtained, removing dead points and Edge strengthening of identification point edges, reducing calculation errors, and converting the Edge into the binary image through a preset threshold, wherein if the preset value is M, wherein M is a brightness value, the value of a pixel is T, and M is greater than T, T is 0, otherwise T is 1, so that the calculation amount in the process of calculating Edge distribution is reduced; performing convolution calculation on the binary image to obtain an edge intensity distribution map, wherein in the embodiment, the binary image is subjected to 5x5 convolution; and respectively obtaining horizontal and vertical edge peak values by using weight calculation, wherein the obtained horizontal edge peak value and the obtained vertical edge peak value are the coordinates of the first central point or the second central point.
In the above embodiment, in step S1: the background plate is completely white, the background plate is filled in the whole image picture, the correction reference mark is a black cross figure, and the size and the width of the black cross figure can be adjusted through the focusing distance of the binocular camera module.
In the above embodiment, step S2 includes: firstly, configuring binocular camera module equipment information, reading a configuration file, respectively obtaining equipment information of a first camera and a second camera for distinguishing and positioning the first camera and the second camera, obtaining equipment on a computer, filtering the obtained equipment to ensure that only video equipment is reserved on the computer, obtaining a list of the video equipment, checking whether the list of the obtained video equipment contains the first camera and the second camera, if so, executing the next step, if not, re-accessing the first camera and the second camera video equipment, re-obtaining the equipment on the computer, confirming whether the list of the computer video equipment contains the binocular camera module equipment to be corrected, if the identification equipment is abnormal, re-connecting the camera equipment, re-obtaining the equipment on the computer, and then judging whether the obtained video equipment conforms to a communication protocol, and when the video equipment conforms to the communication protocol, stopping monitoring the video equipment, if the video equipment does not conform to the protocol, re-acquiring the equipment on the computer, displaying the connection information of the first camera and the second camera on a user interface of the computer, and writing a check code during correction operation.
In the above embodiment, step S3 further includes the following steps:
triggering a key on a computer, starting an App to start correction, starting the execution of an App main thread, reading a configuration file to obtain file information, verifying a check code when correction operation is performed on writing, and displaying an abnormal prompt box and ending a process if the check code does not pass; if the check code passes the verification, acquiring video equipment on the computer through a Microsoft standard interface, and filtering the acquired video equipment to ensure that only the video equipment is reserved on the computer, thereby acquiring a list of the video equipment on the computer; checking whether the first camera and the second camera are contained in the video equipment list, if so, executing the next step, and if not, displaying an abnormal prompt box and ending the process; verifying whether video equipment of the first camera and the second camera and a video format, a resolution, a frame rate and a communication protocol supported by the algorithm are supported or not, wherein the obtained file information is the equipment information of the first camera and the second camera, a check code written in during operation, a correction data format, a frame rate, a resolution, a correction reference point and an image direction of the first camera and the second camera; judging whether the acquired video equipment conforms to the communication protocol, if not, displaying an abnormal prompt box and ending the process, if so, starting the video stream, suspending a frame stream event, and starting a sub-thread, wherein the sub-thread is a calibration reference range box for drawing data through frame data in the video stream, calculating the coordinate of a central point, and storing the coordinate data of the central point, and a user display interface for configuring central correction is a window when an App is opened.
In the above embodiment, the sub-thread executes work in parallel with the main thread after being started.
In the above embodiment, the state in which the correction result meets the requirement is that, in the two camera display images of the binocular camera module, the calibration reference marks in the two camera display images are located at the same position in the calibration reference range frames in the respective images.
In the above embodiment, the reference criterion of the correction process is the correction reference mark in the image corresponding to the camera when the display screen of the camera is set to be in a fixed state, when the camera whose display screen is in the fixed state is the first camera, the reference criterion of the correction result is the correction reference mark in the display screen of the first camera, and when the camera whose display screen is in the fixed state is the second camera, the reference criterion of the correction result is the correction reference mark in the display screen of the second camera.
In the above embodiment, the calibration reference range frame is composed of a plurality of equally spaced square grids, the first center point and the second center point are both located on the grids, the positions where the horizontal direction and the vertical direction of the image move are the number of the grids where the calibration reference mark moves on the grids, the calibration reference range frame is set to be composed of a plurality of equally spaced square grids, the calibration reference mark is limited in the calibration reference range frame, and not only can the calibration reference range frame be verified whether to be qualified through a computer, but also the calibration reference range frame can be conveniently judged whether to be successful through naked eyes.
In the above embodiment, the binocular camera module is connected with the PC end, and the display frames of the two cameras of the binocular camera module are located in two region positions of the same display interface, specifically, the display frames of the two cameras of the binocular camera module are located in two adjacent positions of the same display interface side by side.
In the above embodiment, before the setting of the background board, the method further includes step S0: the binocular camera module is fixedly installed integrally, and black and white cameras and color cameras in the binocular camera module can be deviated.
The above-described embodiments are only one of the preferred embodiments of the present invention, and general changes and substitutions by those skilled in the art within the technical scope of the present invention are included in the protection scope of the present invention.

Claims (6)

1. A center correction method of a binocular camera image is characterized by comprising the following steps:
s1: connecting a binocular camera module to the system platform, respectively importing the shot pictures of two cameras of the binocular camera module, selecting partial areas in the shot pictures as display pictures, and generating a calibration reference range frame in the center of the display pictures;
s2: setting a background plate, and setting a correction reference mark in the center of the background plate;
s3: finely adjusting the angle of the binocular camera module or moving the background plate to enable the correction reference marks to be respectively located in the calibration reference range frames in the two camera shooting pictures of the binocular camera module;
s4: judging whether the correction reference marks in the shot pictures of the two cameras of the binocular camera module meet the requirements or not, if so, executing step S6, and if not, executing step S5;
s5: setting a display picture of one camera to be in a fixed state, setting a display picture of the other camera to be in an unlocked state, defining the camera with the display picture set to be in the fixed state as a first camera, and defining the camera with the display picture set to be in the unlocked state as a second camera;
acquiring a frame of image of a second camera, defining a correction reference mark in the image acquired at the moment as a first central point, moving a plurality of unit pixels of the image of the second camera in the vertical and horizontal directions respectively, and defining the correction reference mark in the image acquired at the moment as a second central point;
determining the unit pixel moving distance of the correction reference mark in the horizontal and vertical directions in the second camera calibration reference range frame through the first central point and the second central point;
moving the image in the frame of the calibration reference range of the second camera so that the calibration reference mark of the second camera is consistent with the calibration reference mark of the first camera;
acquiring coordinates of the first camera and the second camera calibration reference mark, calculating a coordinate difference value of the first camera calibration reference mark and the second camera calibration reference mark, and repeating the step S4;
s6: storing the result and finishing the correction;
the sequence of step S1 and step S2 is not sequential.
2. The binocular camera image center correction method of claim 1, wherein the first center point or the second center point obtaining process further comprises the steps of:
calculating and acquiring brightness data of a certain frame of image in the video stream;
carrying out median filtering and threshold value conversion processing on the obtained brightness data to obtain a binary image;
performing convolution calculation on the binary image to obtain an edge intensity distribution map;
and respectively obtaining horizontal and vertical edge peak values by using weight calculation, wherein the obtained horizontal edge peak value and the obtained vertical edge peak value are the coordinates of the first central point or the second central point.
3. The binocular camera image center correction method according to claim 2, wherein in step S1: the background plate is completely white, and the correction reference mark is a black cross figure.
4. The binocular camera image center correction method according to claim 3, wherein the state of the correction reference mark meeting the requirements is;
in two camera display screens of binocular camera module, the correction reference mark in two camera display screens is located same position in the calibration reference range frame in picture separately.
5. The binocular camera image center correction method of claim 4, wherein the calibration reference range frame is composed of a plurality of equally spaced square grids.
6. The binocular camera image center correction method according to claim 5, wherein the display frames of the two cameras of the binocular camera module are located at two area positions of the same display interface.
CN202010736424.XA 2020-07-28 2020-07-28 Center correction method for binocular camera image Active CN111866499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010736424.XA CN111866499B (en) 2020-07-28 2020-07-28 Center correction method for binocular camera image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010736424.XA CN111866499B (en) 2020-07-28 2020-07-28 Center correction method for binocular camera image

Publications (2)

Publication Number Publication Date
CN111866499A CN111866499A (en) 2020-10-30
CN111866499B true CN111866499B (en) 2022-06-14

Family

ID=72948646

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010736424.XA Active CN111866499B (en) 2020-07-28 2020-07-28 Center correction method for binocular camera image

Country Status (1)

Country Link
CN (1) CN111866499B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113298762B (en) * 2021-05-07 2022-08-02 威海世高光电子有限公司 flare detection method
CN113666081B (en) * 2021-08-04 2022-10-14 常州贝高智能装备股份有限公司 Synchronous feeding positioning correction adjusting method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567714A (en) * 2011-12-14 2012-07-11 深圳市中控生物识别技术有限公司 Method for correcting color image and black-and-white image based on double-camera face identification
CN107995486A (en) * 2017-12-11 2018-05-04 珠海格力电器股份有限公司 A kind of camera bearing calibration and device
CN108848288A (en) * 2018-06-13 2018-11-20 信利光电股份有限公司 A kind of method and dual camera mould group adjusting dual camera optical axis on terminal display screen
CN109495735A (en) * 2017-09-12 2019-03-19 韩国以事美德有限公司 The alignment methods of double camera module
CN109889820A (en) * 2019-03-14 2019-06-14 深圳博时特科技有限公司 Detection method, device, storage medium and the terminal of binocular camera mould group

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567714A (en) * 2011-12-14 2012-07-11 深圳市中控生物识别技术有限公司 Method for correcting color image and black-and-white image based on double-camera face identification
CN109495735A (en) * 2017-09-12 2019-03-19 韩国以事美德有限公司 The alignment methods of double camera module
CN107995486A (en) * 2017-12-11 2018-05-04 珠海格力电器股份有限公司 A kind of camera bearing calibration and device
CN108848288A (en) * 2018-06-13 2018-11-20 信利光电股份有限公司 A kind of method and dual camera mould group adjusting dual camera optical axis on terminal display screen
CN109889820A (en) * 2019-03-14 2019-06-14 深圳博时特科技有限公司 Detection method, device, storage medium and the terminal of binocular camera mould group

Also Published As

Publication number Publication date
CN111866499A (en) 2020-10-30

Similar Documents

Publication Publication Date Title
CN111866499B (en) Center correction method for binocular camera image
US10733705B2 (en) Information processing device, learning processing method, learning device, and object recognition device
US9654750B2 (en) Image processing system, image processing apparatus, and image processing method to respectively display images obtained by dividing one image on first and the second display media
CN111083456A (en) Projection correction method, projection correction device, projector and readable storage medium
CN102567714B (en) Method for correcting color image and black-and-white image based on double-camera face identification
CN102484724A (en) Projection image area detecting device
JP6115214B2 (en) Pattern processing apparatus, pattern processing method, and pattern processing program
CN108564540A (en) Remove image processing method, device and the terminal device that eyeglass is reflective in image
CN112272292B (en) Projection correction method, apparatus and storage medium
CN107992869B (en) Method and device for correcting tilted characters and electronic equipment
CN113286135A (en) Image correction method and apparatus
CN113271447B (en) Laser projection apparatus and image correction system
CN102236790B (en) Image processing method and device
CN111368819A (en) Light spot detection method and device
CN113920502A (en) Cloud deck adjusting method, device, equipment and medium
US20130169791A1 (en) Computing device and method for measuring widths of measured parts
CN116051681B (en) Processing method and system for generating image data based on intelligent watch
CN101729739A (en) Method for rectifying deviation of image
CN116866537A (en) Projection image distortion correction method and projection system based on corner detection
US9581439B1 (en) Image capture device with a calibration function and calibration method of an image capture device
CN113239806B (en) Curtain wall plate identification method and system based on image identification
CN110610163A (en) Table extraction method and tool based on ellipse fitting in natural scene
CN110619629A (en) CPU socket detection method and equipment
CN113470567B (en) Display screen correction method, device and system
CN115035847A (en) LED screen coefficient correction method, device and equipment

Legal Events

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