CN102098441A - Image data transmission method and photographic equipment based on serial peripheral interface (SPI) - Google Patents

Image data transmission method and photographic equipment based on serial peripheral interface (SPI) Download PDF

Info

Publication number
CN102098441A
CN102098441A CN2010105922604A CN201010592260A CN102098441A CN 102098441 A CN102098441 A CN 102098441A CN 2010105922604 A CN2010105922604 A CN 2010105922604A CN 201010592260 A CN201010592260 A CN 201010592260A CN 102098441 A CN102098441 A CN 102098441A
Authority
CN
China
Prior art keywords
imageing sensor
baseband chip
lcd
image data
view 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.)
Granted
Application number
CN2010105922604A
Other languages
Chinese (zh)
Other versions
CN102098441B (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.)
Shenzhen Jingwei Science & Technology Co Ltd
Original Assignee
Shenzhen Jingwei Science & 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 Shenzhen Jingwei Science & Technology Co Ltd filed Critical Shenzhen Jingwei Science & Technology Co Ltd
Priority to CN201010592260.4A priority Critical patent/CN102098441B/en
Publication of CN102098441A publication Critical patent/CN102098441A/en
Application granted granted Critical
Publication of CN102098441B publication Critical patent/CN102098441B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

The invention discloses an image data transmission method and photographic equipment based on a serial peripheral interface (SPI). The method comprises the following steps: S1, judging whether a baseband chip enters into a preview mode or photographing mode in accordance with a user operational order; if entering into the preview mode, executing the S2; and if entering into the photographing mode, executing the S3; S2, receiving a frame synchronizing signal by the baseband chip from an image sensor, and controlling the chip selection of the liquid crystal display through interruption to cause a liquid crystal displsay (LCD) to synchronously receive image data from the image sensor for displaying through an SIP bus; and S3, receiving an output enable signal by the baseband chip from the image sensor and receiving the image data from the image sensor through the SPI bus, and compressing the image data into pictures for storage. The interruption detection control LCDCS is utilized to carry out timing sequence matching control and the functions of the image sensor are utilized sufficiently. A photographic function is realized on an ultra-low end hardware platform based on the SPI, thus enlarging the applied range of the photographic equipment.

Description

Image data transfer method and camera installation based on the SPI interface
Technical field
The present invention relates to image data transmission and camera installation field, relate in particular to a kind of image data transfer method and camera installation based on the SPI interface.
Background technology
Nowadays, wireless communication technology is widely applied in the daily life, and mobile telephone terminal is also popularized because of the convenience of its use.Along with the progress of expanding economy and science and technology, people's living standard improves greatly, and low side mobile telephone terminal multimedia technology can't satisfy people's needs, and the multimedia handset with camera function more and more is subjected to pursuing of people.
Fig. 1 is the connection diagram of imageing sensor and baseband chip in the prior art.Fig. 2 is the structural representation of camera installation in the prior art.Baseband chip among this two width of cloth figure all is that example describes with MT6223C.As illustrated in fig. 1 and 2, after system powered on, imageing sensor was in resting state, and baseband chip MT6223C directly controls LCD (Liquid Crystal Display; Hereinafter to be referred as LCD).When needs used camera function, baseband chip MT6223C configured the display parameters of LCD, wakes imageing sensor and initialization up by imageing sensor reset pin RST then.Baseband chip MT6223C receives pixel clock signal (Pixel clock from imageing sensor; Hereinafter to be referred as PCLK) and the automatic chip selection signal CS of triggering for generating LCD.Simultaneously, baseband chip MT6223C receives view data from imageing sensor by the LCD interface from parallel 8 bit data bus Data (8 bit), and these view data are based on the RGB565/YUV422 coding.When data/address bus epigraph transducer was exported effective view data, baseband chip MT6223C was latched into these view data among the LCD and shows.When taking pictures, baseband chip MT6223C does not produce chip selection signal CS, shows because LCD goes up not have, and the view data of imageing sensor output is directly received by baseband chip MT6223C, baseband chip MT6223C is put in the storage card after these Image Data Compression are become the Jpeg picture.SDA and SCL are the I2C buses, and baseband chip MT6223C is by the work of their control chart image-position sensors.PDN is the sleep signal of imageing sensor, and when withdrawing from camera function, baseband chip MT6223C makes imageing sensor enter resting state by PDN.
In the prior art, can only adopt the baseband chip of higher-end to realize on the multimedia handset hardware designs of main flow, this baseband chip must have parallel 8 show bus and must can receive PCLK and the chip selection signal of automatic triggering for generating LCD, limits to very big and cost is higher.
Summary of the invention
The technical problem to be solved in the present invention is, can not realize the defective of camera function providing a kind of image data transfer method and camera installation based on the SPI interface on the super low-end hardware platform at prior art.
The technical solution adopted for the present invention to solve the technical problems is:
A kind of image data transfer method based on the SPI interface is provided, may further comprise the steps:
Judgement enters preview mode or exposal model according to user's operational order for S1, baseband chip, if enter preview mode, execution in step S2 is if enter exposal model, execution in step S3;
S2, described baseband chip be from imageing sensor received frame synchronizing signal, and by the choosing of interruption controls LCD sheet, make LCD receive view data by spi bus synchronously from described imageing sensor and show;
S3, described baseband chip receive the output enable signal and receive view data by spi bus from described imageing sensor from described imageing sensor, become picture to preserve described Image Data Compression.
The present invention is based in the image data transfer method of SPI interface, described step S1 also comprises, before carrying out the pattern judgement, by described spi bus LCD is carried out initialization and detects whether camera is arranged, if, by described spi bus described camera is carried out initialization, if not, finish described method.
The present invention is based in the image data transfer method of SPI interface, described step S2 specifically comprises:
S21, described baseband chip are opened the external interrupt function and are received described frame synchronizing signal from described imageing sensor;
S22, described baseband chip drag down the sheet choosing of LCD so that described LCD begins to receive described view data by described spi bus from described imageing sensor to be shown when described frame synchronizing signal is the low level triggering signal, and the sheet choosing that described baseband chip is drawn high described LCD during for high trigger signal in described frame synchronizing signal receives view data so that stop described LCD from described imageing sensor.
The present invention is based in the image data transfer method of SPI interface, described step S3 specifically comprises:
S31, described baseband chip be the setting parameter of taking pictures according to user's operational order;
S32, described baseband chip make described imageing sensor enter exposal model to described imageing sensor sending controling instruction;
S33, described baseband chip receive described output enable signal and view data standby ready signal from described imageing sensor, and read described view data by described spi bus from described imageing sensor when described view data standby ready signal is effective;
S34, described baseband chip are that picture is preserved with described coded image data.
The present invention is based in the image data transfer method of SPI interface, among the described step S33, whenever read once described view data after, whether described baseband chip receives the storehouse spill over from described imageing sensor and overflows to detect described view data, if abandon described view data.
The present invention also provides a kind of camera installation based on the SPI interface, comprising:
Baseband chip, be used for judging and enter preview mode or exposal model according to user's operational order, when preview mode, be used for from imageing sensor received frame synchronizing signal and by the choosing of interruption controls LCD sheet, when exposal model, be used for receiving the output enable signal and becoming picture to preserve from described imageing sensor reception view data and with described Image Data Compression by spi bus from described imageing sensor;
Imageing sensor, be used for when preview mode, sending described frame synchronizing signal and sending view data with demonstration to described LCD, and when exposal model, preserve with compression to described baseband chip transmission view data to described baseband chip transmission output enable signal and by spi bus by described spi bus to described baseband chip;
LCD is used for when preview mode control according to described baseband chip and receives described view data by described spi bus synchronously from described imageing sensor and show.
The present invention is based in the camera installation of SPI interface, described baseband chip further comprises:
Display is provided with module, is used for LCD is carried out initialization;
Imageing sensor is provided with module, and whether be used for detecting has camera and when camera is arranged described camera is carried out initialization.
The present invention is based in the camera installation of SPI interface, described baseband chip further comprises:
The external interrupt mouth is used for from described imageing sensor received frame synchronizing signal to control the sheet choosing of described LCD;
Sheet modeling piece, the sheet choosing that is used for dragging down described LCD when described frame synchronizing signal is the low level triggering signal is so that described LCD begins to receive described view data by described spi bus from described imageing sensor to be shown, and the sheet choosing that is used for drawing high during for high trigger signal in described frame synchronizing signal described LCD receives view data so that stop described LCD from described imageing sensor.
The present invention is based in the camera installation of SPI interface, described baseband chip further comprises:
The parameter of taking pictures is provided with module, is used for according to user's operational order the setting parameter of taking pictures;
Pattern is provided with module, is used to generate control command and described control command is sent to described imageing sensor so that described imageing sensor switches between described preview mode and described exposal model;
Encoder, the coded image data that is used for receiving from described imageing sensor are that picture is preserved.
The present invention is based in the camera installation of SPI interface, described imageing sensor further comprises:
Fifo buffer, the parallel image data that are used for described imageing sensor inside are converted to serial image data with output, also are used for when described exposal model the described serial image data of buffer memory and send the view data standby ready signal and send the storehouse spill over to described baseband chip after view data of every transmission to described baseband chip when described serial image data runs up to certain value.
The present invention is based on the image data transfer method of SPI interface and the beneficial effect of camera installation is: by interrupting detecting the function that the choosing of control LCD sheet is carried out the control of sequential coupling and made full use of imageing sensor, on super low-end hardware platform, realized camera function, enlarged the range of application of camera installation based on the SPI interface.
Description of drawings
The invention will be further described below in conjunction with drawings and Examples, in the accompanying drawing:
Fig. 1 is the connection diagram of imageing sensor and baseband chip in the prior art;
Fig. 2 is the structural representation of camera installation in the prior art;
Fig. 3 is according to an embodiment of the invention based on the structural representation of the camera installation of SPI interface;
Fig. 4 is in accordance with another embodiment of the present invention based on the structural representation of the camera installation of SPI interface;
Fig. 5 is according to an embodiment of the invention based on the flow chart of the image data transfer method of SPI interface;
Fig. 6 is in accordance with another embodiment of the present invention based on the flow chart of the image data transfer method of SPI interface.
Embodiment
Fig. 3 is according to an embodiment of the invention based on the structural representation of the camera installation of SPI interface.In the present embodiment, the camera installation based on the SPI interface comprises baseband chip 10, imageing sensor 20 and LCD 30.Imageing sensor 20 is data transmitting equipments, and LCD 30 is data receivers, and baseband chip can receive data also can send data.At preview mode, view data is by imageing sensor 20 outputs, and LCD 30 receptions also show the parameter setting that these view data, baseband chip 10 do not receive view data and only show by spi bus transmission control LCD 30.At exposal model, LCD 30 is closed, and the view data of imageing sensor 20 outputs is received by baseband chip 10.
Baseband chip 10 can be used for judging according to user's operational order entering preview mode or exposal model that user's operational order can be received by the Subscriber Interface Module SIM of the terminal of carrying out camera function.When preview mode, baseband chip 10 can be used for showing so that receive view data in LCD 30 from imageing sensor 20 from imageing sensor 20 received frame synchronizing signals and by 30 choosings of interruption controls LCD.When exposal model, baseband chip 10 can be used for receiving the output enable signal and becoming picture to preserve by spi bus from imageing sensor 20 reception view data and with Image Data Compression from imageing sensor 20.In the present embodiment, baseband chip can be super low-end platforms such as MT6223D, PMB7880, PMB7890.
Imageing sensor 20 can enter different mode of operations according to the different control signal that receives from baseband chip 10.When preview mode, imageing sensor 20 can be used for sending view data to show to baseband chip 10 transmit frame synchronizing signals and by spi bus to LCD 30.When exposal model, imageing sensor 20 can be used for sending the output enable signal and sending view data to be compressed into the picture preservation by spi bus to baseband chip 10 to baseband chip 10.Imageing sensor 20 can be charge coupled device (CCD, Charge Couple Device) transducer or CMOS (Complementary Metal Oxide Semiconductor) (CMOS, Complementary Metal-Oxide Semiconductor) transducer.In one embodiment of the invention, adopt cmos image sensor, comprise a photosensitive matrix in it.Matrix size is relevant with resolution, is 640x480 pixel as VGA, and CIF is a 352x288 pixel.Each pixel is made up of blue (B) three photosensitive units of red (R) green (G), and each sensitization Dan Jun has an analog-to-digital conversion (ADC) unit to be attached thereto.The lens combination of camera module projects external image on the photosensitive matrix, the photosensitive unit of corresponding color is because of the strong and weak voltage/current that produces varying strength of light, convert thereof into digital signal by ADC, under the control of built-in logical circuit and external timing signal with certain rule and the external output image data of speed.
LCD 30 can be used for receiving control signal such as chip selection signal from baseband chip 10, and when preview mode, is used for showing from the imageing sensor 20 synchronous view data that receive by spi bus according to the control of baseband chip 10.In another embodiment of the present invention, LCD can also show from the view data that baseband chip 10 receives about Control-Menu by spi bus.
In the course of work, imageing sensor 20 carries out the signal amplification to voltage or the current signal of gathering earlier, automatic exposure is adjusted, sequencing control, pixel sampling control waits processing, analog signal after will handling is again according to pixels sampled one by one with the output initial numberical data, next these initial numberical datas being carried out the bad point of image repairs, white balance, gamma proofreaies and correct, sharpness, color interpolations etc. are handled so that will carry out data compression to these DIDs at last by RGB or yuv format output digital image data, transfer of data, back end interface Interface Control etc. are so that resolution or the display window size that the view data of output meets the standard of data/address bus and mates LCD.The terminal that possesses camera function receives the operational order of user about model selection, and judgement enters preview mode or exposal model to baseband chip 10 according to user's operational order.If enter preview mode, baseband chip 10 is from imageing sensor 20 received frame synchronizing signals, and by 30 choosings of interruption controls LCD, makes LCD 30 receive view data by spi bus synchronously from imageing sensor 20 and show.If enter exposal model, baseband chip 10 receives the output enable signal and receives view data by spi bus from imageing sensor 20 from imageing sensor 20, then these Image Data Compression is become picture to preserve.
Fig. 4 is in accordance with another embodiment of the present invention based on the structural representation of the camera installation of SPI interface.In the present embodiment, the camera installation based on the SPI interface comprises baseband chip 10, imageing sensor 20 and LCD 30.Baseband chip 10 comprises that further display is provided with module 11, imageing sensor and is provided with that module 12, external interrupt mouth 13, sheet modeling piece 14, the parameter of taking pictures are provided with module 15, pattern is provided with module 16 and encoder 17.Imageing sensor 20 further comprises fifo buffer 21.As shown in Figure 4, SPI_SDO and SPI_SCK are respectively spi bus view data and clock signal, LCD_SA0 is that (high level is a view data to display image data/address signal, low level is the address), LCD_CS and LCD_RST are respectively the sheet choosing and the reset signal of display, SSN is that (be frame synchronizing signal when preview mode, it is synchronous to be used for LCD for imageing sensor bi-directional synchronization signal; When exposal model, be the output enable signal, be used to open the output of fifo buffer), OVF is the storehouse spill over, and RDY is the data ready signal, and PDN and RST are respectively the dormancy and the reset signal of imageing sensor
Baseband chip 10 can be used for judging according to user's operational order entering preview mode or exposal model that user's operational order can be received by the Subscriber Interface Module SIM of the terminal of carrying out camera function.When preview mode, baseband chip 10 can be used for showing so that receive view data in LCD 30 from imageing sensor 20 from imageing sensor 20 received frame synchronizing signals and by 30 choosings of interruption controls LCD.When exposal model, baseband chip 10 can be used for receiving the output enable signal and becoming picture to preserve by spi bus from imageing sensor 20 reception view data and with Image Data Compression from imageing sensor 20.
Display is provided with module 11, can be used for LCD 30 is carried out initialization, and the viewing area of every display parameters of LCD 30 such as resolution, brightness, contrast, colourity etc. and specify image for example is set.
Imageing sensor is provided with module 12, and whether can be used for detecting has imageing sensor and when imageing sensor is arranged imageing sensor is carried out initialization.In one embodiment of the invention, whether the ID that module 12 can reading images transducer 20 is set normal to judge this imageing sensor 20 for imageing sensor.In this embodiment, imageing sensor is provided with module 12 can also write setup code to imageing sensor 20 by the I2C bus, begins output image data after imageing sensor 20 receives this setup code.
External interrupt mouth 13 can be used for from the sheet choosing of imageing sensor 20 received frame synchronizing signals with control LCD 30.In one embodiment of the invention, frame synchronizing signal SSN is connected to this external interrupt mouth 13.The external interrupt function of baseband chip 10 can be passed through external interrupt mouth 13 received frame synchronizing signal SSN after opening.
Sheet modeling piece 14 can be used for directly controlling according to the frame synchronizing signal that receives by external interrupt mouth 13 the sheet choosing of LCD 30.In the present embodiment, when the frame synchronizing signal that receives was the low level triggering signal, sheet modeling piece 14 can be used to cooperate the sheet choosing that drags down LCD 30 to show so that LCD 30 begins to receive view data by spi bus from imageing sensor 20.When the frame synchronizing signal that receives was high trigger signal, sheet modeling piece 14 can be used to cooperate the sheet choosing of drawing high LCD 30 so that stop solution crystal display 30 receives view data from imageing sensor 20.
The parameter of taking pictures is provided with module 15, can be used for according to user's operational order the setting parameter of taking pictures.In the present embodiment, the parameter of taking pictures is provided with module 15 and can be used for being provided with when exposal model and takes pictures parameter so that according to the user's request compressed picture.User's operational order can be received by the Subscriber Interface Module SIM of the terminal with camera function.The parameter of taking pictures can comprise photo size, special efficacy, photographic quality etc.
Pattern is provided with module 16, can be used to generate control command and control command is sent to imageing sensor 20 be in preview mode or exposal model at present so that imageing sensor 20 switches and/or can be used for judgement between preview mode and exposal model.In the present embodiment, pattern is provided with module 16 and can be used to generate control command and control command is sent to imageing sensor 20 so that the SPI interface of imageing sensor 20 switches between preview mode and exposal model.
Encoder 17, the coded image data that can be used for will receiving from imageing sensor 20 when exposal model is that picture is preserved.In the present embodiment, encoder 17 can receive data ready signal RDY from imageing sensor 20 when baseband chip 10 receives output enable signal SSN, and output enable signal SSN can represent that a frame begins.RDY can be set to effectively high or effectively low, effectively is example with height, and when RDY was high level, encoder 17 can receive view data from imageing sensor 20 by spi bus.Encoder 17 can also be used for receiving storehouse spill over OVF from imageing sensor 20 after every reception one secondary data, just abandons the current frame image data if overflow, and receives the next frame view data again.Encoder 17 can be compressed into the coded image data that receives the picture preservation then.In the present embodiment, picture format is a jpeg format.
Imageing sensor 20 can enter different mode of operations according to the different control signal that receives from baseband chip 10.When preview mode, imageing sensor 20 can be used for sending view data to show to baseband chip 10 transmit frame synchronizing signals and by spi bus to LCD 30.When exposal model, imageing sensor 20 can be used for sending the output enable signal and sending view data to be compressed into the picture preservation by spi bus to baseband chip 10 to baseband chip 10.Imageing sensor 20 can comprise fifo buffer 21, and the 8 bit parallel digital data conversion that are used for the output of imageing sensor 20 internal image processing modules are that serial image data is with output.Fifo buffer 21 can also be used for buffer memory serial image data when exposal model, because memory capacity is limited, fifo buffer 21 can only hold the data of several row.Fifo buffer 21 can also be used for sending data ready signal RDY to baseband chip 10 when serial image data runs up to certain value, makes baseband chip in time take view data away in order to avoid cause losing of data.Fifo buffer 21 can also send storehouse spill over OVF so that whether the data that baseband chip 10 detections are received are complete to baseband chip 10 after view data of every transmission.
LCD 30 can be used for receiving control signal such as chip selection signal from baseband chip 10, and when preview mode, is used for showing from the imageing sensor 20 synchronous view data that receive by spi bus according to the control of baseband chip 10.In another embodiment of the present invention, LCD can also show from the view data that baseband chip 10 receives about Control-Menu by spi bus.
In the course of work, display is provided with 11 pairs of LCD of module 30 and carries out initialization, and the viewing area of every display parameters of LCD 30 such as resolution, brightness, contrast, colourity etc. and specify image for example is set.Baseband chip 10 provides the reference clock MCLK of work to imageing sensor 20, and clock frequency is determined according to the type of baseband chip, is 6.5MHz in the present embodiment.Whether the module 12 that is provided with imageing sensor detects has imageing sensor and when imageing sensor is arranged imageing sensor is carried out initialization.In one embodiment of the invention, whether the ID that module 12 can reading images transducer 20 is set normal to judge this imageing sensor 20 for imageing sensor.If imageing sensor 20 is normal, imageing sensor is provided with module 12 can write setup code to imageing sensor 20 by the I2C bus, begins output image data after imageing sensor 20 receives this setup code.If imageing sensor 20 is undesired, then withdraw from camera function.Fifo buffer 21 in the imageing sensor 20 can be that serial image data is with output with 8 bit parallel digital data conversion of imageing sensor 20 internal image processing modules output.
Next, pattern is provided with that module 16 can generate control command and control command is sent to imageing sensor 20 so that the SPI interface of imageing sensor 20 switches and/or pattern is provided with module 16 and can judges and be in preview mode or exposal model at present between preview mode and exposal model.Control command can generate according to user's operational order, and user's operational order can be received by the Subscriber Interface Module SIM of the terminal of carrying out camera function.
When preview mode, baseband chip 10 is opened the external interrupt function and is passed through external interrupt mouth 13 received frame synchronizing signal SSN.When the frame synchronizing signal SSN that receives is the low level triggering signal, represent that a two field picture begins transmission, sheet modeling piece 14 can cooperate the sheet choosing that drags down LCD 30 to show so that LCD 30 begins to receive view data by spi bus from imageing sensor 20.When the frame synchronizing signal that receives is high trigger signal, represent that a two field picture has transmitted to finish that sheet modeling piece 14 can cooperate the sheet choosing of drawing high LCD 30 so that stop solution crystal display 30 receives view data from imageing sensor 20.After finishing the transmission of frame data, continue to judge to enter preview mode or exposal model, so that the next frame view data is carried out respective handling.
When exposal model, the parameter of taking pictures is provided with module 15 can take pictures parameter so that according to the user's request compressed picture according to the setting of user's operational order.User's operational order can be received by the Subscriber Interface Module SIM of the terminal with camera function.The parameter of taking pictures can comprise photo size, special efficacy, photographic quality etc.Fifo buffer 21 can the buffer memory serial image data, because memory capacity is limited, fifo buffer 21 can only hold the data of several row.When a two field picture began to transmit, baseband chip 10 can receive output enable signal SSN from imageing sensor 20, and output enable signal SSN represents the output of opened fifo buffer 21.Simultaneously, encoder 17 can receive data ready signal RDY from fifo buffer 21.RDY can be set to effectively high or effectively low, effectively is example with height, and when RDY was high level, encoder 17 can receive view data from fifo buffer 21 by spi bus.Because fifo buffer 21 generally only can be preserved the capable view data of 1-2, must guarantee that therefore the speed of baseband chip 10 reads image data is faster than the speed of imageing sensor 20 to fifo buffer 21 transmitted image data.Just can not take place fifo buffer 21 to overflow and cause loss of data.Complete in order to ensure view data, encoder 17 can also receive storehouse spill over OVF from imageing sensor 20 after every reception one secondary data, just abandon the current frame image data if overflow during the reading of data, receives the next frame view data again.Do not overflow if having during the reading of data, encoder 17 can be compressed into the coded image data that receives in picture and preserve.In the present embodiment, picture format is a jpeg format.
Fig. 5 is according to an embodiment of the invention based on the flow chart of the image data transfer method of SPI interface.In the present embodiment, this method starts from step S1.In step S1, judgement enters preview mode or exposal model to baseband chip 10 according to user's operational order, if enter preview mode, execution in step S2 is if enter exposal model, execution in step S3.
In step S2, baseband chip 10 is from imageing sensor 20 received frame synchronizing signals, and by 30 choosings of interruption controls LCD, makes LCD 30 receive view data by spi bus synchronously from imageing sensor 20 and show.
In step S3, baseband chip 10 receives the output enable signal and receives view data by spi bus from imageing sensor 20 from imageing sensor 20, then Image Data Compression is become picture to preserve.
Fig. 6 is in accordance with another embodiment of the present invention based on the flow chart of the image data transfer method of SPI interface.In the present embodiment, this method starts from step 601.In step 602,10 pairs of LCD of baseband chip 30 are carried out initialization, and the viewing area of every display parameters of LCD 30 such as resolution, brightness, contrast, colourity etc. and specify image for example is set.In step 603, baseband chip 10 provides the reference clock MCLK of work to imageing sensor 20, and clock frequency is determined according to the type of baseband chip, is 6.5MHz in the present embodiment.In step 604, whether baseband chip 10 detects has imageing sensor 20 and when imageing sensor 20 is arranged imageing sensor 20 is carried out initialization.In one embodiment of the invention, whether the ID that baseband chip 10 can reading images transducer 20 is normal to judge this imageing sensor 20.If imageing sensor 20 is normal, this method continues at step 605, otherwise this method ends at step 618.In step 605, baseband chip 10 can write setup code to imageing sensor 20 by the I2C bus, begins output image data after imageing sensor 20 receives this setup code.
In step 606, baseband chip 10 can generate control command and control command sent to imageing sensor 20 so that the SPI interface of imageing sensor 20 switches and/or baseband chip 10 can be judged and is in preview mode or exposal model at present between preview mode and exposal model according to user's operational order.User's operational order can be received by the Subscriber Interface Module SIM of the terminal of carrying out camera function.If will enter preview mode, this method will continue at step 607, if will enter exposal model, this method will continue at step 612.
In step 607, baseband chip 10 is opened the external interrupt function.In step 608, the low level triggering signal of baseband chip 10 received frame synchronizing signal SSN.In step 609, baseband chip 10 drags down the sheet choosing of LCD 30 and shows so that LCD 30 begins to receive view data by spi bus from imageing sensor 20.In step 610, the high trigger signal of baseband chip 10 received frame synchronizing signal SSN.In step 611, baseband chip 10 is drawn high the sheet choosing of LCD 30 so that stop solution crystal display 30 receives view data from imageing sensor 20.After finishing the transmission of frame data, this method will be repeated on step 606 until withdrawing from camera function.
In step 612, baseband chip 10 can be taken pictures parameter so that according to the user's request compressed picture according to the setting of user's operational order, user's operational order can be received by the Subscriber Interface Module SIM of the terminal with camera function, and the parameter of taking pictures can comprise photo size, special efficacy, photographic quality etc.In step 613, baseband chip 10 sends control command makes the SPI interface of imageing sensor 20 enter exposal model.In step 614, baseband chip 10 can receive output enable signal SSN and data ready signal RDY so that carry out data sync from imageing sensor 20.In step 615, baseband chip 10 can receive view data from imageing sensor 20 by spi bus.In step 616, baseband chip 10 can receive storehouse spill over OVF from imageing sensor 20 and so that whether data are arranged during judging reading overflow after every reception one secondary data, if just abandon the current frame image data and be repeated on step 614, then continue at step 617 if not.In step 617, baseband chip 10 can be compressed into the coded image data that receives in picture and preserve.This method will end at step 618.
After tested, the present invention can realize that the camera of 4W pixel shows to carry out image about 13 frame/seconds on the MTK6223D platform, and when taking pictures, only needing that the view data of taking off is compressed into jpeg format by software can realize.Because of the camera based on imageing sensor has had image processing function, the optimization debugging of image effect can be regulated related register by the I2C bus and realize.
The present invention has realized camera function and also can realize camera function by similar approach on other has the digital equipment of SPI interface only using on the least significant end cell phone platform of serial ports screen.
Though the present invention describes by specific embodiment, it will be appreciated by those skilled in the art that, without departing from the present invention, can also carry out various conversion and be equal to alternative the present invention.In addition, at particular condition or material, can make various modifications to the present invention, and not depart from the scope of the present invention.Therefore, the present invention is not limited to disclosed specific embodiment, and should comprise the whole execution modes that fall in the claim scope of the present invention.

Claims (10)

1. the image data transfer method based on the SPI interface is characterized in that, may further comprise the steps:
Judgement enters preview mode or exposal model according to user's operational order for S1, baseband chip, if enter preview mode, execution in step S2 is if enter exposal model, execution in step S3;
S2, described baseband chip be from imageing sensor received frame synchronizing signal, and by the choosing of interruption controls LCD sheet, make LCD receive view data by spi bus synchronously from described imageing sensor and show;
S3, described baseband chip receive the output enable signal and receive view data by spi bus from described imageing sensor from described imageing sensor, become picture to preserve described Image Data Compression.
2. the image data transfer method based on the SPI interface according to claim 1, it is characterized in that, described step S1 also comprises, before carrying out the pattern judgement, by described spi bus LCD is carried out initialization and detected whether camera is arranged, if described camera is carried out initialization by described spi bus, if not, finish described method.
3. the image data transfer method based on the SPI interface according to claim 1 is characterized in that, described step S2 specifically comprises:
S21, described baseband chip are opened the external interrupt function and are received described frame synchronizing signal from described imageing sensor;
S22, described baseband chip drag down the sheet choosing of LCD so that described LCD begins to receive described view data by described spi bus from described imageing sensor to be shown when described frame synchronizing signal is the low level triggering signal, and the sheet choosing that described baseband chip is drawn high described LCD during for high trigger signal in described frame synchronizing signal receives view data so that stop described LCD from described imageing sensor.
4. the image data transfer method based on the SPI interface according to claim 1 is characterized in that, described step S3 specifically comprises:
S31, described baseband chip be the setting parameter of taking pictures according to user's operational order;
S32, described baseband chip make described imageing sensor enter exposal model to described imageing sensor sending controling instruction;
S33, described baseband chip receive described output enable signal and view data standby ready signal from described imageing sensor, and read described view data by described spi bus from described imageing sensor when described view data standby ready signal is effective;
S34, described baseband chip are that picture is preserved with described coded image data.
5. the image data transfer method based on the SPI interface according to claim 4, it is characterized in that, among the described step S33, whenever after reading once described view data, whether described baseband chip receives the storehouse spill over from described imageing sensor and overflows to detect described view data, if abandon described view data.
6. the camera installation based on the SPI interface is characterized in that, comprising:
Baseband chip, be used for judging and enter preview mode or exposal model according to user's operational order, when preview mode, be used for from imageing sensor received frame synchronizing signal and by the choosing of interruption controls LCD sheet, when exposal model, be used for receiving the output enable signal and becoming picture to preserve from described imageing sensor reception view data and with described Image Data Compression by spi bus from described imageing sensor;
Imageing sensor, be used for when preview mode, sending described frame synchronizing signal and sending view data with demonstration to described LCD, and when exposal model, preserve with compression to described baseband chip transmission view data to described baseband chip transmission output enable signal and by spi bus by described spi bus to described baseband chip;
LCD is used for when preview mode control according to described baseband chip and receives described view data by described spi bus synchronously from described imageing sensor and show.
7. the camera installation based on the SPI interface according to claim 6 is characterized in that, described baseband chip further comprises:
Display is provided with module, is used for LCD is carried out initialization;
Imageing sensor is provided with module, and whether be used for detecting has camera and when camera is arranged described camera is carried out initialization.
8. the camera installation based on the SPI interface according to claim 6 is characterized in that, described baseband chip further comprises:
The external interrupt mouth is used for from described imageing sensor received frame synchronizing signal to control the sheet choosing of described LCD;
Sheet modeling piece, the sheet choosing that is used for dragging down described LCD when described frame synchronizing signal is the low level triggering signal is so that described LCD begins to receive described view data by described spi bus from described imageing sensor to be shown, and the sheet choosing that is used for drawing high during for high trigger signal in described frame synchronizing signal described LCD receives view data so that stop described LCD from described imageing sensor.
9. the camera installation based on the SPI interface according to claim 6 is characterized in that, described baseband chip further comprises:
The parameter of taking pictures is provided with module, is used for according to user's operational order the setting parameter of taking pictures;
Pattern is provided with module, is used to generate control command and described control command is sent to described imageing sensor so that described imageing sensor switches between described preview mode and described exposal model;
Encoder, the coded image data that is used for receiving from described imageing sensor are that picture is preserved.
10. the camera installation based on the SPI interface according to claim 9 is characterized in that, described imageing sensor further comprises:
Fifo buffer, the parallel image data that are used for described imageing sensor inside are converted to serial image data with output, also are used for when described exposal model the described serial image data of buffer memory and send the view data standby ready signal and send the storehouse spill over to described baseband chip after view data of every transmission to described baseband chip when described serial image data runs up to certain value.
CN201010592260.4A 2010-12-16 2010-12-16 Image data transfer method based on SPI interface and camera installation Active CN102098441B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010592260.4A CN102098441B (en) 2010-12-16 2010-12-16 Image data transfer method based on SPI interface and camera installation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010592260.4A CN102098441B (en) 2010-12-16 2010-12-16 Image data transfer method based on SPI interface and camera installation

Publications (2)

Publication Number Publication Date
CN102098441A true CN102098441A (en) 2011-06-15
CN102098441B CN102098441B (en) 2016-09-07

Family

ID=44131289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010592260.4A Active CN102098441B (en) 2010-12-16 2010-12-16 Image data transfer method based on SPI interface and camera installation

Country Status (1)

Country Link
CN (1) CN102098441B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932599A (en) * 2012-11-09 2013-02-13 北京百纳威尔科技有限公司 Device and method to achieve camera function based on general purpose input/output (GPIO) stimulated data bus
CN104427232A (en) * 2013-08-30 2015-03-18 安凯(广州)微电子技术有限公司 Method, device and system for realizing image acquisition
CN105554373A (en) * 2015-11-20 2016-05-04 宇龙计算机通信科技(深圳)有限公司 Photographing processing method and device and terminal
CN105959503A (en) * 2016-05-25 2016-09-21 西北工业大学 Remote image preview transmission method and device
CN107040733A (en) * 2017-04-18 2017-08-11 中国科学院半导体研究所 Cmos image sensor
CN107589289A (en) * 2017-09-04 2018-01-16 中国电子科技集团公司第四十研究所 A kind of spi bus hardware trigger and coding/decoding method based on oscillograph
CN108228127A (en) * 2018-01-09 2018-06-29 武汉精测电子集团股份有限公司 For generating the device of SPI interface figure signal and figure signal generator
CN109639957A (en) * 2017-10-05 2019-04-16 印芯科技股份有限公司 Image data transmission system and image data transfer method
WO2019153264A1 (en) * 2018-02-09 2019-08-15 深圳开阳电子股份有限公司 Iimage pre-processing method and device, image sensor interface, image processing method and device
CN113163113A (en) * 2021-03-29 2021-07-23 广州安凯微电子股份有限公司 Image sensor frame rate and exposure control system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4689802A (en) * 1986-05-22 1987-08-25 Chrysler Motors Corporation Digital pulse width modulator
CN1188930A (en) * 1996-11-29 1998-07-29 Lg电子株式会社 Interface of monitor communicating with personal computer
KR20030024250A (en) * 2001-09-17 2003-03-26 엘지전자 주식회사 Digital camera for mobile device
CN1722810A (en) * 2005-07-11 2006-01-18 中国水利水电科学研究院 A real-time acquisition system for digital camera
CN201174708Y (en) * 2008-01-28 2008-12-31 英华达(上海)电子有限公司 Ethernet access apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4689802A (en) * 1986-05-22 1987-08-25 Chrysler Motors Corporation Digital pulse width modulator
CN1188930A (en) * 1996-11-29 1998-07-29 Lg电子株式会社 Interface of monitor communicating with personal computer
KR20030024250A (en) * 2001-09-17 2003-03-26 엘지전자 주식회사 Digital camera for mobile device
CN1722810A (en) * 2005-07-11 2006-01-18 中国水利水电科学研究院 A real-time acquisition system for digital camera
CN201174708Y (en) * 2008-01-28 2008-12-31 英华达(上海)电子有限公司 Ethernet access apparatus

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
刘亚侠,武海巍,郝志航: "TDI CCD相机成像单元仿真测试仪的设计", 《光学精密工程》 *
吕涛,李众立: "基于CPLD的CMOS图像传感器数据接口设计", 《兵工自动化》 *
孙宏海,王延杰: "CMOS数字摄像机内部控制系统设计与实现", 《微计算机信息》 *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932599A (en) * 2012-11-09 2013-02-13 北京百纳威尔科技有限公司 Device and method to achieve camera function based on general purpose input/output (GPIO) stimulated data bus
CN104427232A (en) * 2013-08-30 2015-03-18 安凯(广州)微电子技术有限公司 Method, device and system for realizing image acquisition
CN104427232B (en) * 2013-08-30 2017-11-24 安凯(广州)微电子技术有限公司 A kind of method, apparatus and system for realizing IMAQ
CN105554373A (en) * 2015-11-20 2016-05-04 宇龙计算机通信科技(深圳)有限公司 Photographing processing method and device and terminal
CN105959503A (en) * 2016-05-25 2016-09-21 西北工业大学 Remote image preview transmission method and device
CN107040733A (en) * 2017-04-18 2017-08-11 中国科学院半导体研究所 Cmos image sensor
CN107040733B (en) * 2017-04-18 2020-10-20 中国科学院半导体研究所 CMOS image sensor
CN107589289A (en) * 2017-09-04 2018-01-16 中国电子科技集团公司第四十研究所 A kind of spi bus hardware trigger and coding/decoding method based on oscillograph
CN109639957A (en) * 2017-10-05 2019-04-16 印芯科技股份有限公司 Image data transmission system and image data transfer method
CN109639957B (en) * 2017-10-05 2020-11-13 广州印芯半导体技术有限公司 Image data transmission system and image data transmission method
CN108228127A (en) * 2018-01-09 2018-06-29 武汉精测电子集团股份有限公司 For generating the device of SPI interface figure signal and figure signal generator
CN108228127B (en) * 2018-01-09 2022-07-01 武汉精测电子集团股份有限公司 Device for generating SPI interface graphic signal and graphic signal generator
WO2019153264A1 (en) * 2018-02-09 2019-08-15 深圳开阳电子股份有限公司 Iimage pre-processing method and device, image sensor interface, image processing method and device
CN111492650A (en) * 2018-02-09 2020-08-04 深圳开阳电子股份有限公司 Image preprocessing method and device, image sensor interface, image processing method and device
CN111492650B (en) * 2018-02-09 2021-04-30 深圳开阳电子股份有限公司 Image preprocessing method and device, image sensor interface, image processing method and device
CN113163113A (en) * 2021-03-29 2021-07-23 广州安凯微电子股份有限公司 Image sensor frame rate and exposure control system and method

Also Published As

Publication number Publication date
CN102098441B (en) 2016-09-07

Similar Documents

Publication Publication Date Title
CN102098441A (en) Image data transmission method and photographic equipment based on serial peripheral interface (SPI)
CN101674400B (en) Camera system and method thereof
KR101796481B1 (en) Method of eliminating shutter-lags with low power consumption, camera module, and mobile device having the same
US7565077B2 (en) Multiple exposure regions in a single frame using a rolling shutter
JP5236775B2 (en) Image capture module and image capture method for avoiding shutter lag
WO2020063505A1 (en) Image processing method, system, and computer readable storage medium
US20070177048A1 (en) Long exposure images using electronic or rolling shutter
JP3216864B2 (en) Imaging system and imaging signal processing device
JP2011234360A5 (en)
JP5397150B2 (en) Lens unit, imaging apparatus, and imaging method
JP2004015595A (en) Digital camera
KR100601460B1 (en) Apparatus and method for interfacing between image sensor and image processor
WO2020063506A1 (en) Smart terminal, image processing method and computer-readable storage medium
EP3528490B1 (en) Image data frame synchronization method and terminal
US8194146B2 (en) Apparatuses for capturing and storing real-time images
WO2023077939A1 (en) Camera switching method and apparatus, and electronic device and storage medium
US7649548B1 (en) Method and apparatus for transferring image data from an internal camera module
US20050190270A1 (en) Method and apparatus for processing image signal
US20070188514A1 (en) Method and system for performing interleaved to planar transformation operations in a mobile terminal having a video display
KR20100007628A (en) Image sensor interface apparatus and digital photographing apparatus comprising the same
JP4429394B2 (en) Information processing apparatus and recording medium
US7433099B2 (en) Image sensing apparatus, image sensing method, program, and storage medium
US20040201693A1 (en) Image processing system
US20040100564A1 (en) Filtering still image data from a multimode stream
CN102550012A (en) Imaging apparatus and imaging method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant