CN102724469A - Method for realizing video acquisition by using camera of Android terminal - Google Patents
Method for realizing video acquisition by using camera of Android terminal Download PDFInfo
- Publication number
- CN102724469A CN102724469A CN2012102219137A CN201210221913A CN102724469A CN 102724469 A CN102724469 A CN 102724469A CN 2012102219137 A CN2012102219137 A CN 2012102219137A CN 201210221913 A CN201210221913 A CN 201210221913A CN 102724469 A CN102724469 A CN 102724469A
- Authority
- CN
- China
- Prior art keywords
- frame data
- video
- jpg
- data
- frame
- 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
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Studio Devices (AREA)
Abstract
The invention relates to the field of video acquisition technologies and discloses a method for realizing video acquisition by using a camera of an Android terminal. The method comprises the following steps of: carrying out frame capture on video data in an acquired video source, and acquiring YUV coded formats of captured video frame data from the captured video frame data; converting the acquired YUV frame data into JPG frame data; and transmitting the converted JPG frame data to a background server. According to the method, the format conversion, docking and real-time transmission of data between the Android terminal and the background server are realized, and real-time and removable video data are provided for the background video server by virtue of a camera component of an Android system and the high-performance video processing capacity of the Android system.
Description
Technical field
The present invention relates to the video acquisition technical field, mainly be applicable to the method for utilizing the Android terminal camera to realize video acquisition.
Background technology
Carry out multimedia video data at the Android platform at present and handle the design of compression transmission supervisor, need use the Camera assembly.The Camera assembly is the multimedia camera processing interface that the Android system carries, and provides based on the required preview of taking pictures of camera, function such as take pictures.But because the Camera assembly is that the camera-enabled that aims at the mobile unit of Android system is developed, it is to satisfy the take pictures interface support of function of this machine that its program development interface only provides.The realtime graphic frame data of Camera assembly generation are yuv data on the other hand, have the imaging data volume bigger, the characteristics that can't compress, thereby can't be as the access data format based on the nervous 3G network of the relative cable network of bandwidth.And the coded system that background server adopted is JPG, and full name is that the JPEG:JPEG picture is stored single raster image with 24 colors.JPEG is and the form of platform independence, supports the compression of highest level.The Camera assembly this as functional characteristic of unit camera and itself the frame image data that can provide in real time be the occupancy that yuv data can't reduce wireless bandwidth after compression, pass the backstage back through 3G network again.This gives based on 3G network exploitation Android camera collection real-time video monitoring data and has brought great obstruction.
Summary of the invention
Technical problem to be solved by this invention provides the method that a kind of Android of utilization terminal camera is realized video acquisition, it realized the data between Android terminal and the background server format conversion, dock and real-time Transmission.
For solving the problems of the technologies described above, the invention provides a kind of Android of utilization terminal camera and realize that the method for video acquisition comprises:
Video data achieve frame in the video source that gets access to is caught, and from the video requency frame data that captures, obtains the YUV coded format of itself;
Convert the YUV frame data that get access to into the JPG frame data;
JPG frame data after the conversion are sent to background server.
Further, the video data achieve frame in the video source that gets access to is caught, and from the video requency frame data that captures, obtain before the YUV coded format of itself, earlier the video source that gets access to is realized the preview screen effect said.
Further, said the video source that gets access to is realized that the preview screen effect comprises:
Camera assembly through the Android system obtains video source, again the video source that gets access to is realized the preview screen effect.
Further, when the video source that gets access to is realized the preview screen effect, the normal bright lock event of insertion screen in the life cycle of the time-out of terminal forms and recovery.
Further, convert the YUV frame data that get access to into the JPG frame data after, again the JPG frame data are compressed, and the JPG frame data after will compressing are sent to background server.
Further, call the C algorithm and convert the YUV frame data that get access to into the JPG frame data, and the JPG frame data after the conversion are compressed.
Further, the JPG frame data after the conversion are sent to the backstage comprise:, transmit the byte video data based on 3G network in real time to background server by the TCP connection through connecting at Android Platform Implementation TCP.
Further, with the conversion after the JPG frame data be sent to background server after, whether the judgment data frame obtains and finishes again;
Do not finish if obtain, then continue the video data achieve frame in the video source that gets access to is caught, and from the video captured frame data, obtain the YUV coded format of itself; After converting the YUV frame data that get access to into the JPG frame data, again the JPG frame data are compressed, and the JPG frame data after will compressing are sent to background server and obtain until Frame and finish;
Finish if obtain, then stop preview.
Further, call the C algorithm and convert the YUV frame data that get access to into the JPG frame data, and the JPG frame data after changing are compressed according to Joint Photographic Experts Group picture compression algorithm.
Beneficial effect of the present invention is:
The present invention realized the data between Android terminal and the background server format conversion, dock and real-time Transmission; The camera assembly of using the Android system with and high performance Video processing ability, for the backstage video server provides real-time, portable video data.The present invention can be adaptable across any collection based on the portable real time video data of video server in Android environment operation; Can simplify exploitation realization greatly, and have high performance based on the real-time portable monitor video data acquisition function of 3G network.
Description of drawings
Fig. 1 realizes the flow chart of the method for video acquisition for the Android terminal camera that utilizes that the embodiment of the invention proposes.
Embodiment
Reach technological means and the effect that predetermined goal of the invention is taked for further setting forth the present invention; Below in conjunction with accompanying drawing and preferred embodiment, the Android terminal camera that utilizes that proposes according to the present invention is realized that the embodiment and the principle of the method for video acquisition are elaborated.
Can know that by Fig. 1 the method for utilizing the Android terminal camera to realize video acquisition provided by the invention comprises:
Camera assembly through the Android system obtains video source, again the video source that gets access to is realized the preview screen effect; Wherein, when the preview screen effect, in the time-out onPause of terminal forms and the life cycle of recovering onResume, insert the normal bright lock event of screen terminal obtaining when preventing to make a video recording because of standby blank screen break of video source;
Video data achieve frame in the video source that gets access to is caught, and from the video requency frame data that captures, obtains the YUV coded format of itself;
Convert the YUV frame data that get access to into the JPG frame data, and the JPG frame data after the conversion are compressed; Preferably, in the present embodiment, call the C algorithm and convert the YUV frame data that get access to into the JPG frame data, and the JPG frame data after changing are compressed according to Joint Photographic Experts Group picture compression algorithm.
Through connecting, connect the byte video data that to change after compressing based on 3G network by TCP and transmit in real time to background server at Android Platform Implementation TCP.
After data were sent to background server, whether the judgment data frame obtains finished;
Do not finish if obtain, then continue the video data achieve frame in the video source that gets access to is caught, and from the video captured frame data, obtain the YUV coded format of itself; After converting the YUV frame data that get access to into the JPG frame data, according to Joint Photographic Experts Group picture compression algorithm the JPG frame data are compressed again, and the JPG frame data after will compressing are sent to background server and obtain until Frame and finish;
Finish if obtain, then stop preview.
When using the Android of utilization terminal camera provided by the invention to realize that the method for video acquisition is carried out video acquisition, in the present embodiment, the Android terminal is the Android mobile phone.Camera assembly through the Android system obtains video source, again the video source that gets access to is realized the preview screen effect; Shoot with video-corder for being applicable to for a long time simultaneously, when the preview screen effect, in the time-out onPause of mobile phone forms and the life cycle of recovering onResume, insert mobile phone and shield normal bright lock event mobile phone obtaining when preventing to make a video recording because of standby blank screen break of video source.Video data achieve frame in the video source that gets access to is caught, and from the video requency frame data that captures, obtains the YUV coded format of itself; Convert the YUV frame data that get access to into the JPG frame data, and the JPG frame data after changing are compressed according to Joint Photographic Experts Group picture compression algorithm; Through connecting, connect the byte video data that to change after compressing based on 3G network by TCP and transmit in real time to background server at Android Platform Implementation TCP.After data were sent to background server, whether the judgment data frame obtains finished; Do not finish if obtain, then continue the video data achieve frame in the video source that gets access to is caught, and from the video captured frame data, obtain the YUV coded format of itself; After converting the YUV frame data that get access to into the JPG frame data, according to Joint Photographic Experts Group picture compression algorithm the JPG frame data are compressed again, and the JPG frame data after will compressing are sent to background server and obtain until Frame and finish; Finish if obtain, then stop preview.The video data that is sent to background server can provide and the real-time synchronous long-range effect of checking of mobile phone transmitting terminal preview to the user through the processing of background server.
The present invention realized the data between Android terminal and the background server format conversion, dock and real-time Transmission; The camera assembly of using the Android system with and high performance Video processing ability, for the backstage video server provides real-time, portable video data.The present invention can be adaptable across any collection based on the portable real time video data of video server in Android environment operation; Can simplify exploitation realization greatly, and have high performance based on the real-time portable monitor video data acquisition function of 3G network.
It should be noted last that; Above embodiment is only unrestricted in order to technical scheme of the present invention to be described; Although with reference to instance the present invention is specified, those of ordinary skill in the art should be appreciated that and can make amendment or be equal to replacement technical scheme of the present invention; And not breaking away from the spirit and the scope of technical scheme of the present invention, it all should be encompassed in the middle of the claim scope of the present invention.
Claims (9)
1. a method of utilizing the Android terminal camera to realize video acquisition is characterized in that, comprising:
Video data achieve frame in the video source that gets access to is caught, and from the video requency frame data that captures, obtains the YUV coded format of itself;
Convert the YUV frame data that get access to into the JPG frame data;
JPG frame data after the conversion are sent to background server.
2. the method for utilizing the Android terminal camera to realize video acquisition as claimed in claim 1; It is characterized in that; Said video data achieve frame in the video source that gets access to is caught; And from the video requency frame data that captures, obtain before the YUV coded format of itself, earlier the video source that gets access to is realized the preview screen effect.
3. the method for utilizing the Android terminal camera to realize video acquisition as claimed in claim 2 is characterized in that, said the video source that gets access to is realized that the preview screen effect comprises:
Camera assembly through the Android system obtains video source, again the video source that gets access to is realized the preview screen effect.
4. the method for utilizing the Android terminal camera to realize video acquisition as claimed in claim 3; It is characterized in that; When the video source that gets access to is realized the preview screen effect, the normal bright lock event of insertion screen in the life cycle of the time-out of terminal forms and recovery.
5. the method for utilizing the Android terminal camera to realize video acquisition as claimed in claim 1; It is characterized in that; After converting the YUV frame data that get access to into the JPG frame data, again the JPG frame data are compressed, and the JPG frame data after will compressing are sent to background server.
6. the method for utilizing the Android terminal camera to realize video acquisition as claimed in claim 5 is characterized in that, calls the C algorithm and converts the YUV frame data that get access to into the JPG frame data, and the JPG frame data after the conversion are compressed.
7. the method for utilizing the Android terminal camera to realize video acquisition as claimed in claim 1; It is characterized in that; JPG frame data after the conversion are sent to the backstage to be comprised: through connecting at Android Platform Implementation TCP, in real time transmit byte video data based on 3G network to background server by the TCP connection.
8. the method for utilizing the Android terminal camera to realize video acquisition as claimed in claim 5 is characterized in that, the JPG frame data after the conversion are sent to background server after, whether the judgment data frame obtains and finishes again;
Do not finish if obtain, then continue the video data achieve frame in the video source that gets access to is caught, and from the video captured frame data, obtain the YUV coded format of itself; After converting the YUV frame data that get access to into the JPG frame data, again the JPG frame data are compressed, and the JPG frame data after will compressing are sent to background server and obtain until Frame and finish;
Finish if obtain, then stop preview.
9. the method for utilizing the Android terminal camera to realize video acquisition as claimed in claim 6; It is characterized in that; Call the C algorithm and convert the YUV frame data that get access to into the JPG frame data, and the JPG frame data after changing are compressed according to Joint Photographic Experts Group picture compression algorithm.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2012102219137A CN102724469A (en) | 2012-06-29 | 2012-06-29 | Method for realizing video acquisition by using camera of Android terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2012102219137A CN102724469A (en) | 2012-06-29 | 2012-06-29 | Method for realizing video acquisition by using camera of Android terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102724469A true CN102724469A (en) | 2012-10-10 |
Family
ID=46950118
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2012102219137A Pending CN102724469A (en) | 2012-06-29 | 2012-06-29 | Method for realizing video acquisition by using camera of Android terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102724469A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103281500A (en) * | 2013-04-24 | 2013-09-04 | 贵阳朗玛信息技术股份有限公司 | Method and device for processing videos |
CN104023191A (en) * | 2014-06-13 | 2014-09-03 | 暨南大学 | Android-based camera projection system and implementation method |
CN105578008A (en) * | 2015-12-23 | 2016-05-11 | 福建星网智慧科技股份有限公司 | Method of improving USB 2.0 camera high resolution high frame rate based on android terminal |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1525774A (en) * | 2003-03-19 | 2004-09-01 | 北京中星微电子有限公司 | Image processing method for mobile communication terminal having pick-up head |
CN1874501A (en) * | 2006-06-06 | 2006-12-06 | 北京翼域精彩科技有限公司 | Video digital monitor and control system and method in use for 3G mobile communication |
CN1874495A (en) * | 2006-01-24 | 2006-12-06 | 华为技术有限公司 | Wireless method and system of monitoring and controlling video based on mobile communication platform in third generation |
CN1968406A (en) * | 2005-11-18 | 2007-05-23 | 联通新时讯通信有限公司 | Wireless real-time video monitoring system and method |
CN102378001A (en) * | 2010-08-11 | 2012-03-14 | 中国电信股份有限公司 | Mobile terminal supporting picture live broadcast mode, video live broadcast method thereof and system thereof |
-
2012
- 2012-06-29 CN CN2012102219137A patent/CN102724469A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1525774A (en) * | 2003-03-19 | 2004-09-01 | 北京中星微电子有限公司 | Image processing method for mobile communication terminal having pick-up head |
CN1968406A (en) * | 2005-11-18 | 2007-05-23 | 联通新时讯通信有限公司 | Wireless real-time video monitoring system and method |
CN1874495A (en) * | 2006-01-24 | 2006-12-06 | 华为技术有限公司 | Wireless method and system of monitoring and controlling video based on mobile communication platform in third generation |
CN1874501A (en) * | 2006-06-06 | 2006-12-06 | 北京翼域精彩科技有限公司 | Video digital monitor and control system and method in use for 3G mobile communication |
CN102378001A (en) * | 2010-08-11 | 2012-03-14 | 中国电信股份有限公司 | Mobile terminal supporting picture live broadcast mode, video live broadcast method thereof and system thereof |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103281500A (en) * | 2013-04-24 | 2013-09-04 | 贵阳朗玛信息技术股份有限公司 | Method and device for processing videos |
CN104023191A (en) * | 2014-06-13 | 2014-09-03 | 暨南大学 | Android-based camera projection system and implementation method |
CN105578008A (en) * | 2015-12-23 | 2016-05-11 | 福建星网智慧科技股份有限公司 | Method of improving USB 2.0 camera high resolution high frame rate based on android terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101725888B1 (en) | Method and apparatus for providing image in camera or remote-controller for camera | |
CN203416351U (en) | A power station workshop video monitoring system | |
WO2014086223A1 (en) | Video communication method and apparatus | |
CN102377730A (en) | Audio/video signal processing method and mobile terminal | |
CN201403166Y (en) | Intelligent image monitoring and alarming device | |
CN111432169A (en) | Video transmission method, device, equipment and system | |
KR100770835B1 (en) | Image data processing system and it's method | |
CN102833527A (en) | Communication method of mobile terminal and browser and software implementation thereof | |
CN102088593A (en) | MPEG4 (Moving Pictures Experts Group 4) compressed video transmission communication system and method based on Bluetooth 3.0 specification | |
CN102724469A (en) | Method for realizing video acquisition by using camera of Android terminal | |
CN201398221Y (en) | Cell phone shooting live broadcasting system | |
CN101931797A (en) | Mobile communication terminal and video call method | |
CN110870293B (en) | Video shooting processing method and device and video shooting processing system | |
CN102065274A (en) | Home video monitoring system and method based on digital set top box | |
CN201699884U (en) | Rail locomotive remote video monitoring system | |
CN101521754A (en) | Remote two-person photo sticker | |
CN201563203U (en) | Home video monitoring system based on digital TV set top box | |
CN101437157B (en) | Multipath CDMA video transmission system for monitoring railway field video | |
WO2016015576A1 (en) | System and method for remote screen capturing in double-stream mode | |
CN114095660B (en) | Image display method and device, storage medium and electronic equipment | |
CN101374219A (en) | Method for implementing visual telephone business by wireless net-playing card through PC terminal pick-up head | |
US20080291262A1 (en) | Visual communication method and appratus | |
CN106027991B (en) | Medical video image live broadcast all-in-one | |
CN104581025A (en) | Image monitoring system and method | |
CN102510427B (en) | Real-time online transmission method for cell phone with low network bandwidth |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20121010 |