CN102932599A - Device and method to achieve camera function based on general purpose input/output (GPIO) stimulated data bus - Google Patents

Device and method to achieve camera function based on general purpose input/output (GPIO) stimulated data bus Download PDF

Info

Publication number
CN102932599A
CN102932599A CN2012104486791A CN201210448679A CN102932599A CN 102932599 A CN102932599 A CN 102932599A CN 2012104486791 A CN2012104486791 A CN 2012104486791A CN 201210448679 A CN201210448679 A CN 201210448679A CN 102932599 A CN102932599 A CN 102932599A
Authority
CN
China
Prior art keywords
interface
imageing sensor
data
execution
described imageing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2012104486791A
Other languages
Chinese (zh)
Inventor
曲盼旺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Beny Wave Science and Technology Co Ltd
Original Assignee
Beijing Beny Wave Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Beny Wave Science and Technology Co Ltd filed Critical Beijing Beny Wave Science and Technology Co Ltd
Priority to CN2012104486791A priority Critical patent/CN102932599A/en
Publication of CN102932599A publication Critical patent/CN102932599A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

The invention discloses a device and a method to achieve a camera function based on a general purpose input/output (GPIO) stimulated data bus. The direct connection of a main processor and an image sensor is used in the device, a data bus of a camera is stimulated by eight GPIO ports of the main processor, an I2C bus is achieved by stimulation of two GPIO ports of the main processor to be used in the parameter configuration of the image sensor, two interrupts of the main processor are used for connecting horizontal synchronizing signals and frame synchronizing signals of the camera, and then acquiring of image data is achieved by software algorithm. The acquired image data are translated into red, green, blue (RGB) data and output on a display to achieve a preview function of the camera. Or the acquired image data are translated into joint photographic expert group (JPEG) data to achieve a picture storage function after pictures are taken. A graphic hardware processor is of no need, and a soft ware is used for achieving. The technical scheme of the device and the method to achieve the camera function based on the GPIO stimulated data is low in cost and suitable for a low-end system.

Description

Realize the device and method of camera-enabled based on the GPIO analog data bus
Technical field
The present invention relates to a kind of image processing techniques, relate in particular to a kind of device and method of realizing camera-enabled based on the GPIO analog data bus.
Background technology
CAMERA(is camera in embedded system) application more and more general, brought enriching experiences to the user.An image hardware processor is generally arranged in general system, come special reception ﹠ disposal from the view data of imageing sensor, its implementation structure as shown in Figure 1, ISP collaborative process device receives from the view data of imageing sensor and with it as the image hardware processor be sent to master processor processes after processing, thereby realize the function of camera.Yet, owing to need special-purpose image hardware processor, cause the cost of embedded system higher.
Summary of the invention
The object of the present invention is to provide a kind of device and method of realizing camera-enabled based on the GPIO analog data bus.
For achieving the above object, the invention provides a kind of device based on GPIO analog data bus realization camera-enabled, comprise primary processor and coupled imageing sensor, described primary processor is carried out following steps:
Step S1, power-up initializing;
Step S2 behind described imageing sensor power-up initializing, judges whether to receive the frame synchronizing signal that described imageing sensor sends, if not, and execution in step S3 then, otherwise execution in step S4 and later step thereof;
Step S3 shows a frame image data or preservation;
Step S4 judges whether to receive the line synchronizing signal that described imageing sensor sends, if receive, and execution in step S5 then, otherwise inoperation;
Step S5, the view data that a newly-built priority is high receives task, and sends the valid data event to this view data reception task;
Step S6 after described view data Processing tasks receives the valid data event, gathers the view data from described imageing sensor;
Step S7 judges whether to receive the instruction of withdrawing from the CAMERA function, if so, and execution in step S8 then, otherwise redirect execution in step S3;
Step S8 carries out lower electricity operation to described imageing sensor, closes clock output.
Again on the one hand, the present invention also provides a kind of method that adopts said apparatus to realize camera-enabled, comprises the steps:
Step S1, power-up initializing;
Step S2 behind described imageing sensor power-up initializing, judges whether to receive the frame synchronizing signal that described imageing sensor sends, if not, and execution in step S3 then, otherwise execution in step S4 and later step thereof;
Step S3 shows a frame image data or preservation;
Step S4 judges whether to receive the line synchronizing signal that described imageing sensor sends, if receive, and execution in step S5 then, otherwise inoperation;
Step S5, the view data that a newly-built priority is high receives task, and sends the valid data event to this view data reception task;
Step S6 after described view data Processing tasks receives the valid data event, gathers the view data from described imageing sensor;
Step S7 judges whether to receive the instruction of withdrawing from the CAMERA function, if so, and execution in step S8 then, otherwise redirect execution in step S3;
Step S8 carries out lower electricity operation to described imageing sensor, closes clock output.
Device based on GPIO analog data bus realization camera-enabled of the present invention has adopted primary processor directly to link to each other with imageing sensor, adopt the data/address bus of 8 GPIO mouth simulation CAMERA of primary processor, adopt two GPIO mouth simulations of primary processor to realize the I2C bus, the parameter configuration that is used for imageing sensor, adopt line synchronizing signal and the frame synchronizing signal of two middle connection breaking CAMERA of primary processor, then realize obtaining of view data through software algorithm, the view data of obtaining is converted on the rgb format data output display again, realize the CAMERA preview function, perhaps the view data of obtaining is converted into the data of jpeg format, the realization rear picture-storage function of taking pictures, thus realized the function of camera.Owing to not needing special-purpose image hardware processor to adopt software to realize, therefore, the cost of the device of realizing camera-enabled based on the GPIO analog data bus of the present invention is relatively low, is very suitable for the less demanding end systems of processing speed.
Description of drawings
Fig. 1 is the structured flowchart of the device of Implementation of Embedded System camera-enabled in the prior art;
Fig. 2 is the electrical block diagram of realizing the device of camera-enabled based on the GPIO analog data bus of the present invention;
Fig. 3 is the method flow diagram that employing of the present invention device shown in Figure 2 is realized camera-enabled.
Embodiment
Below in conjunction with accompanying drawing the specific embodiment of the present invention is described in detail:
With reference to shown in Figure 2, present embodiment realize that based on the GPIO analog data bus device of camera-enabled comprises that model is that primary processor and the coupled model of MT6223D is the OV7690 imageing sensor.Wherein, the D0 of the GPIO16 of primary processor~GPIO23 interface and imageing sensor~D7 data bus interface is corresponding linking to each other as data/address bus one by one, is used for receiving the view data from imageing sensor.The SCL interface of the GPIO10 interface of primary processor and GPIO11 interface and imageing sensor and SDA interface is corresponding linking to each other as the I2C bus one by one, is used for arranging the parameter of imageing sensor, realizes that the imageing sensor initiation parameter arranges and the effect parameter setting.The HREF interface of the interrupt interface EINT2 of primary processor and interrupt interface EINT3 and imageing sensor and VSYNC interface is corresponding linking to each other one by one, EINT2 and EINT3 are respectively imageing sensor line synchronizing signal and frame synchronizing signal are provided, and are used for notifying newline of primary processor real-time judge and a new frame when data are arranged.The GPIO27 interface of primary processor links to each other with the PCLK interface of imageing sensor, thereby GPIO27 can provide to judge effective pixel value and the PCLK signal that reads the effective image data to imageing sensor.The CLK0 interface of primary processor links to each other with the MCLK interface of imageing sensor, and the output of CLK0 interface is as the master clock signal of imageing sensor.
In conjunction with shown in Figure 3, present embodiment realize that based on the GPIO analog data bus method flow of realization camera-enabled of device of camera-enabled is as follows:
Step S1, power-up initializing.Concrete, when opening the CAMERA function, at first be to carry out powering on and relevant initiation parameter setting of CAMERA.Power on: the 2.8V power supply that imageing sensor uses, open relevant control circuit at software, enable 2.8V to imageing sensor, CLK0 output 6.5MHZ is set.Parameter initialization: wait power on stable after, by the I2C bus, with the initiation parameter of imageing sensor comprise that the output frame size arranges, output frequency and some the effect parameter settings of the inner electric sequence of imageing sensor, PCLK write in the imageing sensor.
Step S2 behind the imageing sensor power-up initializing, judges whether to receive the frame synchronizing signal (being the VSYNC signal of Low level effective) that imageing sensor sends, if not, and execution in step S3 then, otherwise execution in step S4 and later step thereof.
Step S3 shows a frame image data or preservation, and this step idiographic flow is as follows:
Step S301 when not receiving the frame synchronizing signal that imageing sensor sends, judges whether to receive photographing instruction, if so, and execution in step S302 then, otherwise execution in step S303;
Step S302 is converted into the jpeg format data with the current frame image data and preserves;
Step S303 is converted into the rgb format data with the current frame image data and is sent in real time the display screen demonstration.
Step S4 judges whether to receive the line synchronizing signal (being the effective HREF signal of high level) that imageing sensor sends, if receive, and execution in step S5 then, otherwise inoperation.
Step S5, the view data that a newly-built priority is high receives task CAM_TASK, and sends the valid data event to this view data reception task.Because the time that receives 128 pixels of delegation is long for interrupting processing, and may cause system crash, so newly set up the reception of the high task CAM_TASK special disposal view data of priority.
Step S6 after the view data Processing tasks receives the valid data event, gathers the view data from imageing sensor.In order to guarantee not to be affected during the image data, should mask first all interruptions of system.By shown in Figure 2, GPIO16~GPIO23 has been used as data/address bus, by the databook of MT6223D as can be known: GPIO16~GPIO23 is that namely the address is the low byte of 0x80120110, so the valid data of each pixel just temporarily are stored in the low byte of this address a GPIO group the inside.Because the effective status of PCLK is high level, when namely GPIO27 reads high level, effective when being stored in the low byte data of address 0x80120110.128 effective pixels are arranged in the delegation, and 128*2=256 effective byte so when judging that PCLK is high effective status, just go to read in the low byte data of address 0x80120110, reads altogether 256 and gets final product.These 256 data are stored among the CAMERA_BUFFER that VSYNC prepares in interrupting, and carry out capable sign, at next line because this part is strict to time requirement, be to the C programmer optimization process of writing, or use implementation by assembly.
Step S7 judges whether to receive the instruction of withdrawing from the CAMERA function, if so, and execution in step S7 then, otherwise redirect execution in step S3;
Step S8 carries out lower electricity operation to imageing sensor, closes clock output, to save electrical source consumption.
Above embodiment is described preferred implementation of the present invention; be not that scope of the present invention is limited; design under the prerequisite of spirit not breaking away from the present invention; various distortion and improvement that the common engineers and technicians in this area make technical scheme of the present invention all should fall in the definite protection range of claims of the present invention.

Claims (6)

1. the device based on GPIO analog data bus realization camera-enabled is characterized in that, comprise primary processor and coupled imageing sensor, described primary processor is carried out following steps:
Step S1, power-up initializing;
Step S2 behind described imageing sensor power-up initializing, judges whether to receive the frame synchronizing signal that described imageing sensor sends, if not, and execution in step S3 then, otherwise execution in step S4 and later step thereof;
Step S3 shows a frame image data or preservation;
Step S4 judges whether to receive the line synchronizing signal that described imageing sensor sends, if receive, and execution in step S5 then, otherwise inoperation;
Step S5, the view data that a newly-built priority is high receives task, and sends the valid data event to this view data reception task;
Step S6 after described view data Processing tasks receives the valid data event, gathers the view data from described imageing sensor;
Step S7 judges whether to receive the instruction of withdrawing from the CAMERA function, if so, and execution in step S8 then, otherwise redirect execution in step S3;
Step S8 carries out lower electricity operation to described imageing sensor, closes clock output.
2. device according to claim 1 is characterized in that, shows among the described step S2 that a frame image data or preservation are specially:
Step S301 when not receiving the frame synchronizing signal that described imageing sensor sends, judges whether to receive photographing instruction, if so, and execution in step S302 then, otherwise execution in step S303;
Step S302 is converted into the jpeg format data with the current frame image data and preserves;
Step S303 is converted into the rgb format data with the current frame image data and is sent in real time the display screen demonstration.
3. device according to claim 2, it is characterized in that, the model of described primary processor is MT6223D, the model of described imageing sensor is OV7690, the D0 of the GPIO16 of described primary processor~GPIO23 interface and described imageing sensor~D7 data bus interface is corresponding linking to each other as data/address bus one by one, the SCL interface of the GPIO10 interface of described primary processor and GPIO11 interface and described imageing sensor and SDA interface is corresponding linking to each other as the I2C bus one by one, the HREF interface of the interrupt interface EINT2 of described primary processor and interrupt interface EINT3 and described imageing sensor and VSYNC interface is corresponding linking to each other one by one, the GPIO27 interface of described primary processor links to each other with the PCLK interface of described imageing sensor, and the CLK0 interface of described primary processor links to each other with the MCLK interface of described imageing sensor.
4. an employing is characterized in that as weighing the method for 1 described device realization camera-enabled, comprises the steps:
Step S1, power-up initializing;
Step S2 behind described imageing sensor power-up initializing, judges whether to receive the frame synchronizing signal that described imageing sensor sends, if not, and execution in step S3 then, otherwise execution in step S4 and later step thereof;
Step S3 shows a frame image data or preservation;
Step S4 judges whether to receive the line synchronizing signal that described imageing sensor sends, if receive, and execution in step S5 then, otherwise inoperation;
Step S5, the view data that a newly-built priority is high receives task, and sends the valid data event to this view data reception task;
Step S6 after described view data Processing tasks receives the valid data event, gathers the view data from described imageing sensor;
Step S7 judges whether to receive the instruction of withdrawing from the CAMERA function, if so, and execution in step S8 then, otherwise redirect execution in step S3;
Step S8 carries out lower electricity operation to described imageing sensor, closes clock output.
5. method according to claim 4 is characterized in that, shows among the described step S2 to be specially a frame image data or preservation:
Step S301 when not receiving the frame synchronizing signal that described imageing sensor sends, judges whether to receive photographing instruction, if so, and execution in step S302 then, otherwise execution in step S303;
Step S302 is converted into the jpeg format data with the current frame image data and preserves;
Step S303 is converted into the rgb format data with the current frame image data and is sent in real time the display screen demonstration.
6. method according to claim 5, it is characterized in that, the model of described primary processor is MT6223D, the model of described imageing sensor is OV7690, the D0 of the GPIO16 of described primary processor~GPIO23 interface and described imageing sensor~D7 data bus interface is corresponding linking to each other as data/address bus one by one, the SCL interface of the GPIO10 interface of described primary processor and GPIO11 interface and described imageing sensor and SDA interface is corresponding linking to each other as the I2C bus one by one, the HREF interface of the interrupt interface EINT2 of described primary processor and interrupt interface EINT3 and described imageing sensor and VSYNC interface is corresponding linking to each other one by one, the GPIO27 interface of described primary processor links to each other with the PCLK interface of described imageing sensor, and the CLK0 interface of described primary processor links to each other with the MCLK interface of described imageing sensor.
CN2012104486791A 2012-11-09 2012-11-09 Device and method to achieve camera function based on general purpose input/output (GPIO) stimulated data bus Pending CN102932599A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012104486791A CN102932599A (en) 2012-11-09 2012-11-09 Device and method to achieve camera function based on general purpose input/output (GPIO) stimulated data bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012104486791A CN102932599A (en) 2012-11-09 2012-11-09 Device and method to achieve camera function based on general purpose input/output (GPIO) stimulated data bus

Publications (1)

Publication Number Publication Date
CN102932599A true CN102932599A (en) 2013-02-13

Family

ID=47647288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012104486791A Pending CN102932599A (en) 2012-11-09 2012-11-09 Device and method to achieve camera function based on general purpose input/output (GPIO) stimulated data bus

Country Status (1)

Country Link
CN (1) CN102932599A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506960A (en) * 2016-11-29 2017-03-15 维沃移动通信有限公司 A kind of processing method of view data and mobile terminal
CN112417802A (en) * 2020-11-12 2021-02-26 深圳市创智成科技股份有限公司 Method, system, equipment and storage medium for simulating storage chip
CN116095436A (en) * 2023-04-10 2023-05-09 南京予芯科技有限公司 Self-adaptive vehicle-mounted camera driving method

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1309350A (en) * 2000-01-24 2001-08-22 摩托罗拉公司 Flexible interruption controller comprising one interuption forced register
CN1547082A (en) * 2003-12-12 2004-11-17 中兴通讯股份有限公司 Programmable interrupt controller
CN1866231A (en) * 2005-05-18 2006-11-22 大唐移动通信设备有限公司 Method for implementing logic interrupt priority in embedded real-time operating system
CN201004179Y (en) * 2007-02-01 2008-01-09 武汉正路电子科技有限公司 Real time scanning automatic confliction alarming control system for car road condition
CN101378426A (en) * 2008-09-02 2009-03-04 深圳华为通信技术有限公司 Method and terminal for preventing disturb
CN101674400A (en) * 2008-09-12 2010-03-17 深圳市经纬科技有限公司 Camera system and method thereof
CN102098441A (en) * 2010-12-16 2011-06-15 深圳市经纬科技有限公司 Image data transmission method and photographic equipment based on serial peripheral interface (SPI)
CN102164207A (en) * 2011-03-09 2011-08-24 青岛海信移动通信技术股份有限公司 Image acquisition method and device
CN102263904A (en) * 2011-08-17 2011-11-30 华为终端有限公司 Method and system for controlling double cameras and electronic equipment with double cameras
CN102546859A (en) * 2010-12-22 2012-07-04 康佳集团股份有限公司 Mobile phone
CN102646202A (en) * 2011-02-18 2012-08-22 上海三旗通信科技股份有限公司 Dual-SD (Secure Digital) card function for simulating SPI (Serial Peripheral Interface) manner
CN202424874U (en) * 2012-01-19 2012-09-05 北京英泰智软件技术发展有限公司 Camera control system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1309350A (en) * 2000-01-24 2001-08-22 摩托罗拉公司 Flexible interruption controller comprising one interuption forced register
CN1547082A (en) * 2003-12-12 2004-11-17 中兴通讯股份有限公司 Programmable interrupt controller
CN1866231A (en) * 2005-05-18 2006-11-22 大唐移动通信设备有限公司 Method for implementing logic interrupt priority in embedded real-time operating system
CN201004179Y (en) * 2007-02-01 2008-01-09 武汉正路电子科技有限公司 Real time scanning automatic confliction alarming control system for car road condition
CN101378426A (en) * 2008-09-02 2009-03-04 深圳华为通信技术有限公司 Method and terminal for preventing disturb
CN101674400A (en) * 2008-09-12 2010-03-17 深圳市经纬科技有限公司 Camera system and method thereof
CN102098441A (en) * 2010-12-16 2011-06-15 深圳市经纬科技有限公司 Image data transmission method and photographic equipment based on serial peripheral interface (SPI)
CN102546859A (en) * 2010-12-22 2012-07-04 康佳集团股份有限公司 Mobile phone
CN102646202A (en) * 2011-02-18 2012-08-22 上海三旗通信科技股份有限公司 Dual-SD (Secure Digital) card function for simulating SPI (Serial Peripheral Interface) manner
CN102164207A (en) * 2011-03-09 2011-08-24 青岛海信移动通信技术股份有限公司 Image acquisition method and device
CN102263904A (en) * 2011-08-17 2011-11-30 华为终端有限公司 Method and system for controlling double cameras and electronic equipment with double cameras
CN202424874U (en) * 2012-01-19 2012-09-05 北京英泰智软件技术发展有限公司 Camera control system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506960A (en) * 2016-11-29 2017-03-15 维沃移动通信有限公司 A kind of processing method of view data and mobile terminal
CN106506960B (en) * 2016-11-29 2019-06-07 维沃移动通信有限公司 A kind of processing method and mobile terminal of image data
CN112417802A (en) * 2020-11-12 2021-02-26 深圳市创智成科技股份有限公司 Method, system, equipment and storage medium for simulating storage chip
CN112417802B (en) * 2020-11-12 2022-04-19 深圳市创智成科技股份有限公司 Method, system, equipment and storage medium for simulating storage chip
CN116095436A (en) * 2023-04-10 2023-05-09 南京予芯科技有限公司 Self-adaptive vehicle-mounted camera driving method
CN116095436B (en) * 2023-04-10 2023-06-30 南京予芯科技有限公司 Self-adaptive vehicle-mounted camera driving method

Similar Documents

Publication Publication Date Title
US11741916B2 (en) Video frame rate compensation through adjustment of timing of scanout
CN101674400B (en) Camera system and method thereof
US6816163B2 (en) Updating image frames on a screen comprising memory
CN104360511A (en) MIPI module test method and test system realizing two modes
CN109040836B (en) Method and device for analyzing ARINC818 protocol video stream
CN102932599A (en) Device and method to achieve camera function based on general purpose input/output (GPIO) stimulated data bus
CN202694758U (en) Advanced RISC machine (ARM) signal spreading display device
EP2012535B1 (en) Direct interface of camera module to general purpose i/o port of digital baseband processor
CN103838533B (en) The synchronous method of figure signal and sync card in computer cluster splice displaying system
CN204272298U (en) Multichannel expanded type multi-screen splicer
US20040201693A1 (en) Image processing system
CN103198808B (en) Liquid crystal display splicing wall curtain display control program
CN216700149U (en) Image output control system based on android system
CN202721742U (en) High definition hybrid matrix seamless switching DVI digital interface system
CN203225823U (en) Image acquisition processing system based on ARM11 and WINCE6.0
CN217935773U (en) LED transmitting card
CN111629119B (en) MIPI data processing method, device, storage medium and display terminal
CN203675196U (en) Network control 3G-SDI high-definition characters superimposer
CN204066680U (en) Realize the MIPI module group test system of COMMAND pattern
CN204031376U (en) A kind of image decompressor and image character synthesis system
CN114520856A (en) Video time sequence signal generation method, programmable logic device and video control equipment
CN102833552A (en) High-definition camera shooting method and system and field programmable gate array
KR101127846B1 (en) Apparatus driving of display device
KR20150135653A (en) Apparatus for controlling power provided with multi-vision, and Method thereof
CN115841804A (en) Resolution real-time switching control method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into 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: 20130213