CN112118381A - Method for controlling double cameras through single-camera controller through switch - Google Patents
Method for controlling double cameras through single-camera controller through switch Download PDFInfo
- Publication number
- CN112118381A CN112118381A CN201910532126.6A CN201910532126A CN112118381A CN 112118381 A CN112118381 A CN 112118381A CN 201910532126 A CN201910532126 A CN 201910532126A CN 112118381 A CN112118381 A CN 112118381A
- Authority
- CN
- China
- Prior art keywords
- camera
- camera module
- switch
- cameras
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/65—Control of camera operation in relation to power supply
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
The invention provides a method for controlling double cameras by a single camera controller through a switch, which connects data lines and control lines of the two cameras together and is connected with the camera controller. The two cameras respectively send the data collected by the cameras to the controller in a time-sharing multiplexing mode. Therefore, the optional range of the CPU is greatly increased, the cost can be greatly reduced, and the technical effect that the double cameras can work is achieved. By adding an interface switch, the control is simpler and more convenient, and the smooth control and the replacement and maintenance of devices are facilitated.
Description
Technical Field
The invention relates to the technical field of face image recognition, in particular to a method for controlling two cameras by a single-camera controller through a switch.
Background
With the continuous development of science and technology, particularly the development of computer vision technology, face recognition technology is widely applied to various fields such as information security, electronic authentication and the like, and is an era of image-keeping at any time nowadays, and with the progress of science and technology, more and more biometric-based technology is applied to the daily life of people. For example, the face recognition technology is applied to attendance machines, face payment, intelligent locks based on face recognition and the like. More and more face recognition technologies provide better experience for users and more convenient service. As basic equipment of the face recognition technology: dual cameras are increasingly being provided in mobile or non-mobile terminals. Whether the image of the face is a living face or not can be judged based on the feature values extracted by the two cameras.
In order to facilitate face recognition, one of the two cameras is a black-and-white camera, and the other one of the two cameras is a color camera. Whether the image of the face is a live face can be judged based on the feature values extracted by the two cameras. And the two cameras on the current market are mostly in a one-to-one mode that one camera corresponds to one camera controller. And the selection range of manufacturers is small, and the price is high. Current implementations require more than 2 camera controllers in the CPU to acquire black and white and color images, respectively. But most of the CPUs in common use in the market only have one camera for control. Therefore, the selectable range of manufacturers is small, and the CPU with 2 camera controllers is high in common price. Resulting in an increase in the price of the product and a decrease in competitiveness. In addition, the interface control of the two cameras can be realized by setting an IIC interface switch, and the simpler and more convenient control can be realized by adding an interface switch.
Disclosure of Invention
In order to solve the problems in the prior art, the present invention aims to: the circuit designed by the invention can use one camera controller to connect two cameras. And connecting the data lines and the control lines of the two cameras together and connecting the data lines and the control lines with the cameras. The two cameras respectively send the data collected by the cameras to the controller in a time-sharing multiplexing mode. Therefore, the selectable range of the CPU is greatly increased, and the cost can be greatly reduced.
The invention provides a method for controlling double cameras by a single camera controller through a switch, which comprises the following steps:
s1, supplying power to the double-camera module;
s2, the single-camera controller is selectively connected with the first camera module through the IIC interface switch, sends an initialization list to the first camera module, and sends a prohibition command to the first camera module;
s3, the single-camera controller is selectively connected with the second camera module through the IIC interface switch, sends the initialization list to the second camera module and sends a prohibition command to the second camera module;
s4, connecting the single-camera controller with a first camera module through an IIC interface switch, sending an enabling command to the first camera module, and sending the acquired data to a specified cache of the CPU by the first camera module through a specified time sequence according to the initialized configuration;
s5, the single-camera controller receives a frame of complete data and generates an interrupt to inform the application program to acquire the data of the first camera from the designated buffer area;
s6, immediately sending a prohibition command to the first camera through the IIC interface switch after the interruption, sending an enabling command to the second camera through the IIC interface switch after the prohibition command is sent, sending the collected data to a specified cache of a CPU through a specified time sequence by the second camera module according to the initialized configuration, and obtaining the data of the second camera by the application program;
s7, repeating the above steps S4-S6.
The first camera module collects black and white.
The second camera module collects color.
In the process of step S5, the second camera is in the prohibition state, and the data line and the clock line of the corresponding interface are both in the high impedance state; the first camera module, the second camera module data line and the clock line are common but do not influence the first camera to transmit data.
And the resolution ratios of the cameras of the first camera module and the second camera module are the same.
The IIC interface switch is connected with the first camera module or the second camera module selectively.
And when the IIC interface switch is selected to be connected with the first camera module, the IIC interface switch is named as IIC-1 connection.
And when the IIC interface switch is selected to be connected with the second camera module, the IIC interface switch is named as IIC-2 connection.
The application has the advantages that: from the above, the method for controlling the two cameras by the single-camera controller through the switch provided by the invention connects the data lines and the control lines of the two cameras together and connects the data lines and the control lines with the camera controller. The two cameras respectively send the data collected by the cameras to the controller in a time-sharing multiplexing mode. Therefore, the optional range of the CPU is greatly increased, the cost can be greatly reduced, and the technical effect that the double cameras can work is achieved. By adding an interface switch, the control is simpler and more convenient, and the smooth control and the replacement and maintenance of devices are facilitated.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention.
FIG. 1 is a schematic block flow diagram of the method of the present invention.
Fig. 2 is a block flow diagram of an embodiment of the present invention.
Detailed Description
Currently, the technical terms commonly used in the art are as follows:
a CPU: english abbreviation of Central Processing Unit Central Processing Unit.
IIC: the english Inter-Integrated Circuit bus. This bus type is a simple, bi-directional, two-wire, synchronous serial bus designed by philips semiconductors. The method is mainly used for master-slave communication between the master controller and the slave devices, is used in small data volume occasions, and has short transmission distance.
High resistance state: is a common term in a digital circuit, and refers to an output state of the circuit, which is neither high level nor low level, and has no influence on a next circuit if a high impedance state is input into the next circuit, and is basically the same as the output state.
As shown in fig. 1, the method includes:
s1, supplying power to the double-camera module;
s2, the single-camera controller is selectively connected with the first camera module through the IIC interface switch, sends an initialization list to the first camera module, and sends a prohibition command to the first camera module;
s3, the single-camera controller is selectively connected with the second camera module through the IIC interface switch, sends the initialization list to the second camera module and sends a prohibition command to the second camera module;
s4, connecting the single-camera controller with a first camera module through an IIC interface switch, sending an enabling command to the first camera module, and sending the acquired data to a specified cache of the CPU by the first camera module through a specified time sequence according to the initialized configuration;
s5, the single-camera controller receives a frame of complete data and generates an interrupt to inform the application program to acquire the data of the first camera from the designated buffer area;
s6, immediately sending a prohibition command to the first camera through the IIC interface switch after the interruption, sending an enabling command to the second camera through the IIC interface switch after the prohibition command is sent, sending the collected data to a specified cache of a CPU through a specified time sequence by the second camera module according to the initialized configuration, and obtaining the data of the second camera by the application program;
s7, repeating the above steps S4-S6.
The general flow of operating a camera is as follows:
firstly, the camera module is powered on,
secondly, sending an initialization list to a camera module through an IIC interface (a camera sensor starts working to convert the sensed result into a digital signal),
and sending the enabling command to the camera module again, and sending the acquired data to a cache appointed by the CPU by the camera through an appointed time sequence according to the initialized configuration.
And finally, the camera controller receives a frame of complete data, generates an interrupt and informs an application program to obtain a frame of acquired image data from the specified buffer area.
When the prohibition command is sent to the camera module, the interfaces for transmitting data are all high-impedance, so that the data transmission of the camera parallel to the interfaces is not influenced.
Specifically, the process of obtaining images from the camera module when the camera module is used is as follows:
first, both camera modules are powered up.
Secondly, the initialization list is sent to the first camera module (black and white) through the IIC-1 interface, and a prohibition command is sent to the first camera module (black and white).
And sending the initialization list to the second camera module (color) and sending a prohibition command to the second camera module (color) through the IIC-2 interface.
And sending an enabling command to the first camera module (black and white) through the IIC-1 interface, and sending the acquired data to a specified cache of the CPU by the camera module through a specified time sequence according to the initialized configuration.
The camera controller receives a frame of complete data, and generates an interrupt to inform an application program of collecting data of the black and white camera from a specified buffer area. In the process, the second camera (color) is in a forbidden state, the data line and the clock line of the corresponding interface are both in a high configuration, and although the data line and the clock line of the first camera module (black and white) and the second camera module (color) are common, the data transmission of the first camera (black and white) is not influenced.
And finally, immediately sending a prohibition command to the first camera (black and white) through the IIC-1 after the interruption is generated, sending an enable command to the second camera (color) through the IIC-2 after the sending is finished, and then sending the acquired data to a specified cache of the CPU through a specified time sequence by the second camera module (color) according to the initialized configuration. The application program can acquire the data of the color camera.
The steps are circulated in such a way, and the purpose of double cameras can be realized through one camera.
Since a camera controller is used, the resolution of the first camera and the second camera must be the same, otherwise no valid data can be acquired. If the IIC addresses of the two cameras are different, the IIC-1 and the IIC-2 can also use one IIC controller, and the first camera and the second camera can be distinguished through the addresses.
As shown in fig. 2, the method can be applied to a scenario including: the camera comprises a first camera module, a second camera module and a camera controller; the camera controller is arranged in the CPU, an IIC interface switch is arranged in the CPU and used for controlling connection with the first camera module or the second camera module, and the camera controller is connected with the first camera module and the second camera module through a data line, a clock line and an MCLK line.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes may be made to the embodiment of the present invention by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (8)
1. A method for realizing control of double cameras by a single camera controller through a switch is characterized by comprising the following steps:
s1, supplying power to the double-camera module;
s2, the single-camera controller is selectively connected with the first camera module through the IIC interface switch, sends an initialization list to the first camera module, and sends a prohibition command to the first camera module;
s3, the single-camera controller is selectively connected with the second camera module through the IIC interface switch, sends the initialization list to the second camera module and sends a prohibition command to the second camera module;
s4, connecting the single-camera controller with a first camera module through an IIC interface switch, sending an enabling command to the first camera module, and sending the acquired data to a specified cache of the CPU by the first camera module through a specified time sequence according to the initialized configuration;
s5, the single-camera controller receives a frame of complete data and generates an interrupt to inform the application program to acquire the data of the first camera from the designated buffer area;
s6, immediately sending a prohibition command to the first camera through the IIC interface switch after the interruption, sending an enabling command to the second camera through the IIC interface switch after the prohibition command is sent, sending the collected data to a specified cache of a CPU through a specified time sequence by the second camera module according to the initialized configuration, and obtaining the data of the second camera by the application program;
s7, repeating the above steps S4-S6.
2. The method for controlling two cameras through the switch of the single camera controller according to claim 1, wherein the first camera module collects black and white.
3. The method of claim 1, wherein the second camera module collects color.
4. The method for controlling two cameras through the single camera controller implemented by the switch as claimed in claim 1, wherein in the process of step S5, the second camera is in the disabled state, and the data line and the clock line of the corresponding interface are both in the high impedance state; the first camera module, the second camera module data line and the clock line are common but do not influence the first camera to transmit data.
5. The method for controlling two cameras through the single-camera controller implemented by the switch as claimed in claim 1, wherein the resolutions of the cameras of the first camera module and the second camera module are the same.
6. The method for controlling two cameras through the single-camera controller implemented by the switch as claimed in claim 1, wherein the IIC interface switch is selectively connected to the first camera module or the second camera module.
7. The method for controlling two cameras through the single-camera controller implemented by the switch as claimed in claim 6, wherein the IIC interface switch is named IIC-1 connection when the IIC interface switch selects the connection with the first camera module.
8. The method for controlling two cameras through the single camera controller implemented by the switch as claimed in claim 6, wherein the IIC interface switch is named IIC-2 connection when the IIC interface switch selects the connection with the second camera module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910532126.6A CN112118381A (en) | 2019-06-19 | 2019-06-19 | Method for controlling double cameras through single-camera controller through switch |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910532126.6A CN112118381A (en) | 2019-06-19 | 2019-06-19 | Method for controlling double cameras through single-camera controller through switch |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112118381A true CN112118381A (en) | 2020-12-22 |
Family
ID=73796735
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910532126.6A Pending CN112118381A (en) | 2019-06-19 | 2019-06-19 | Method for controlling double cameras through single-camera controller through switch |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112118381A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101827219A (en) * | 2010-01-22 | 2010-09-08 | 中兴通讯股份有限公司 | Method and device for controlling two cameras in master/slave mode in wireless terminal |
CN201846415U (en) * | 2010-11-23 | 2011-05-25 | 汉王科技股份有限公司 | Face recognition device with double collaborative cameras |
CN204069149U (en) * | 2014-10-09 | 2014-12-31 | 上海卓悠网络科技有限公司 | A kind of switching circuit realizing two 13M pixel camera head and switch |
CN205545654U (en) * | 2016-01-26 | 2016-08-31 | 北京数字家圆科技有限公司 | Two camera devices and terminal equipment who uses thereof |
CN106954046A (en) * | 2017-04-01 | 2017-07-14 | 罗旗舞 | A kind of video acquisition device and method |
-
2019
- 2019-06-19 CN CN201910532126.6A patent/CN112118381A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101827219A (en) * | 2010-01-22 | 2010-09-08 | 中兴通讯股份有限公司 | Method and device for controlling two cameras in master/slave mode in wireless terminal |
CN201846415U (en) * | 2010-11-23 | 2011-05-25 | 汉王科技股份有限公司 | Face recognition device with double collaborative cameras |
CN204069149U (en) * | 2014-10-09 | 2014-12-31 | 上海卓悠网络科技有限公司 | A kind of switching circuit realizing two 13M pixel camera head and switch |
CN205545654U (en) * | 2016-01-26 | 2016-08-31 | 北京数字家圆科技有限公司 | Two camera devices and terminal equipment who uses thereof |
CN106954046A (en) * | 2017-04-01 | 2017-07-14 | 罗旗舞 | A kind of video acquisition device and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7765344B2 (en) | Apparatus and method for dynamically providing hub or host operations | |
CN101827219B (en) | Method and device for controlling two cameras in master/slave mode in wireless terminal | |
US20090234998A1 (en) | Connection system | |
KR100743491B1 (en) | Universal interface devices and method thereof | |
CN109313466B (en) | System for implementing MXM on PCI card | |
KR20110069271A (en) | Imaging device and method for sharing memory among chips | |
US9563582B2 (en) | Modular device, system, and method for reconfigurable data distribution | |
CN108292990A (en) | Communication system and communication means | |
CN110971855A (en) | DVR system and method based on USB Type-C interface | |
CN107911597A (en) | Image collecting device and intelligent terminal | |
CN104270740A (en) | Slot-sharing T card and SIM card detection method | |
CN102445981B (en) | Data transmission system and data transmission method | |
CN112118381A (en) | Method for controlling double cameras through single-camera controller through switch | |
CN112118384A (en) | Method for controlling double cameras by single-camera controller | |
CN112118385A (en) | System for controlling double cameras by single-camera controller | |
CN112118383A (en) | Method for obtaining double-camera data through single-camera controller | |
CN112118382A (en) | System for controlling double-camera module through change-over switch | |
CN203966106U (en) | Software updating apparatus and system | |
CN107038132B (en) | Circuit and method for synchronously controlling multiple peripheral devices | |
CN110188060A (en) | Mode switching system and the mode switching method for applying it | |
KR20000042653A (en) | Apparatus and method for processing snap shot of usb camera | |
CN214225994U (en) | ESP 32-S-based household security intelligent door lock system | |
CN107015935B (en) | Docking apparatus and control method thereof | |
CN114661646A (en) | Serial port switching control circuit | |
CN107613213B (en) | Intelligent camera of embedded platform and image data transmission method thereof |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20201222 |