CN109510998B - The method for obtaining unpressed IP Camera initial data - Google Patents
The method for obtaining unpressed IP Camera initial data Download PDFInfo
- Publication number
- CN109510998B CN109510998B CN201811573718.4A CN201811573718A CN109510998B CN 109510998 B CN109510998 B CN 109510998B CN 201811573718 A CN201811573718 A CN 201811573718A CN 109510998 B CN109510998 B CN 109510998B
- Authority
- CN
- China
- Prior art keywords
- binary file
- camera
- data
- network server
- transferred
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/231—Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
- H04N21/266—Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/438—Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving MPEG packets from an IP network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/643—Communication protocols
Abstract
The invention discloses a kind of methods for obtaining unpressed IP Camera initial data directly to save as binary file for data, and copy the file under the root of web server after server-side camera obtains data;Binary file is obtained using HTTP library function in client, and handles file obtained as needed.The present invention effectively avoids the loss that image data generates in transmission process by compression, provides accurate data;Operation is integrated in backstage, provides convenient and fast API as late comer's use.
Description
Technical field
The invention belongs to infrared image processing fields, and in particular to a kind of to obtain unpressed IP Camera initial data
Method.
Background technique
When IP Camera transmits video, frequently with H.264 compress technique, bandwidth occupancy is reduced, but in the process, figure
As information can lose.
Binary file is file format the most basic in computer system, can save original complete data.
Original data are placed under the root of WEB server, this document can be obtained by browser.Use HTTP library function
Original document is obtained, operational efficiency can be improved, provides convenient interface for subsequent expansion algorithm function.
C language can efficiently operate peripheral hardware, and the data in peripheral hardware are saved as binary file.WEB server can be with
So that the network equipment obtains file by URL.The two is owned by mature implementation.
Client can obtain data by URL.By HTTP library function, may be implemented to obtain URL automatically included
Data.
IP Camera transmitting video data at present, it will usually compress video and be improved efficiency with reducing bandwidth.Once encountering
When needing initial data, loss brought by compression video just cannot be ignored.The present invention is the demand based on transmission original video
Summary of the invention
It is an object of the invention to propose a kind of method for obtaining unpressed IP Camera initial data, net is realized
Network transmits raw video signal, meets proof of algorithm, the demand that algorithm function is realized.
The technical solution for realizing the aim of the invention is as follows: a kind of side obtaining unpressed IP Camera initial data
Method realizes that steps are as follows:
Step 1) network server opens camera device, and setting camera input format is YUYV, and camera is arranged
Resolution ratio is transferred to step 2);Client obtains the URL of binary file on network server simultaneously, is transferred to step 9);
The register of step 2) network server application video data, the format that register is arranged is camera memory cell
Formula is transferred to step 3);
Step 3) network server is mapped to head memory is imaged in register, and is transferred to step 4);
Step 4) network server opens video stream data acquisition, starts to acquire video data, is transferred to step 5);
Step 5) network server obtains original video data from register, is transferred to step 6);
The initial data that step 6) network server will acquire is saved into binary file, is transferred to step 7);
Step 7) network server copies to binary file under the root of HTTP server, is transferred to step 8);
Step 8) return step 4), when camera setting is normal, guarantee binary file real-time update;
Step 9) client obtains binary file by the URL of binary file.
The present invention compared to the prior art, remarkable advantage:
(1) video file without damage is provided.
(2) api interface provided convenience.
(3) it can be effectively integrated in other programs.
Detailed description of the invention
Fig. 1 is the flow chart for the method that the present invention obtains unpressed IP Camera initial data.
Fig. 2 is the structure chart for the method that the present invention obtains unpressed IP Camera initial data.
Specific implementation method
Present invention is further described in detail with reference to the accompanying drawing.
Binary file is file type basic in computer system.Vision signal is stored as binary file can be with
Effectively storage complete signal.By client side HTTP library function, convenient and fast initial data API can be obtained, is tested for subsequent algorithm
Card and image procossing provide the foundation.
A kind of method obtaining unpressed IP Camera initial data combined with Figure 1 and Figure 2, realizes that steps are as follows:
Step 1) network server opens camera device, and setting camera input format is YUYV, and camera is arranged
Resolution ratio is transferred to step 2);Client obtains the URL of binary file on network server simultaneously, is transferred to step 9):
It is provided with camera input format, specific steps are as follows:
The standard of video 1-1) is set;
The resolution ratio of video 1-2) is set;
The frame per second of video 1-3) is set;
The format set 1-4) is inputted into camera.
The input format of video is generated by demand.Using the input data of YUYV format, available highest 16
Valid data.In infrared image processing, need to use high-order gray level image, therefore we can will exceed brightness range
Gradation data is stored in carrier chrominance signal.
The register of step 2) network server application video data, the format that register is arranged is camera memory cell
Formula is transferred to step 3).
Step 3) network server is mapped to head memory is imaged in register, and is transferred to step 4).
Step 4) network server opens video stream data acquisition, starts to acquire video data, is transferred to step 5).
Step 5) network server obtains original video data from register, is transferred to step 6).
Above step is only realized in Linux, in Windows system, does not directly read the API of camera data.
The initial data that step 6) network server will acquire is saved into binary file, is transferred to step 7).
Wherein saving original video data is binary file, specific steps are as follows:
6-1) obtain the address for preserving original video data;
6-2) obtain the length of original video data;
6-3) obtain the file object for the binary file to be saved;
6-4) since the first address of original video data, the data in address are saved in binary file object,
Address increases;
Address 6-5) is checked, if being less than base address adds data length, by the data supplementing in address to binary system text
In part, binary file object is discharged if being equal to base address.
Binary file is uncompressed, and occupied space is very big, so covering previous frame figure when every this frame image of storage
Picture, to balance the precision of images, real-time, system resource.
Step 7) network server copies to binary file under the root of HTTP server, is transferred to step 8);
URL directly is opened using browser, can directly browse/download this document.No requirement of real-time can be as
This is realized.
Step 8) return step 4), when camera setting is normal, guarantee binary file real-time update;
Step 9) client obtains binary file, specific steps by the URL of binary file are as follows:
9-1) open http port;
Returning an object value 9-2) is obtained by URL;
The status code for 9-3) checking returning an object value, the throw exception if status code is not 200;
9-4) obtain the content of returning an object value, the as unpressed IP Camera initial data of high-precision.
The binary file read at this time is in the returning an object value of HTTP library function, in the memory of client.No
It is same as directly downloading by browser, the data in memory can be used directly.
Claims (5)
1. a kind of method for obtaining unpressed IP Camera initial data, which is characterized in that realize that steps are as follows:
Step 1) network server opens camera device, and setting camera input format is YUYV, and camera resolution is arranged
Rate is transferred to step 2;Client obtains the URL of binary file on network server simultaneously, is transferred to step 9);
The register of step 2 network server application video data, the format that register is arranged is camera memory format, is turned
Enter step 3);
Step 3) network server is mapped to head memory is imaged in register, and is transferred to step 4);
Step 4) network server opens video stream data acquisition, starts to acquire video data, is transferred to step 5);
Step 5) network server obtains original video data from register, is transferred to step 6);
The initial data that step 6) network server will acquire is saved into binary file, is transferred to step 7);
Step 7) network server copies to binary file under the root of HTTP server, is transferred to step 8);
Step 8) return step 4), when camera setting is normal, guarantee binary file real-time update;
Step 9) client obtains binary file by the URL of binary file.
2. the method according to claim 1 for obtaining unpressed IP Camera initial data, it is characterised in that: above-mentioned
In step 1), camera input format, specific steps are set are as follows:
The standard of video 1-1) is set;
The resolution ratio of video 1-2) is set;
The frame per second of video 1-3) is set;
The format set 1-4) is inputted into camera.
3. the method according to claim 1 for obtaining unpressed IP Camera initial data, it is characterised in that: above-mentioned
In step 6), preservation original video data is binary file, specific steps are as follows:
6-1) obtain the address for preserving original video data;
6-2) obtain the length of original video data;
6-3) obtain the file object for the binary file to be saved;
6-4) since the first address of original video data, the data in address are saved in binary file object, address
Increase;
6-5) check address, if being less than base address adds data length, by the data supplementing to binary file in address,
Binary file object is discharged if being equal to base address.
4. the method according to claim 1 for obtaining unpressed IP Camera initial data, it is characterised in that: above-mentioned
In step 1), the URL of binary file is the address set in advance in advance.
5. the method according to claim 1 for obtaining unpressed IP Camera initial data, it is characterised in that: above-mentioned
In step 9), specific steps are as follows:
9-1) open http port;
Returning an object value 9-2) is obtained by URL;
The status code for 9-3) checking returning an object value, the throw exception if status code is not 200;
9-4) obtain the content of returning an object value, the as unpressed IP Camera initial data of high-precision.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811573718.4A CN109510998B (en) | 2018-12-21 | 2018-12-21 | The method for obtaining unpressed IP Camera initial data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811573718.4A CN109510998B (en) | 2018-12-21 | 2018-12-21 | The method for obtaining unpressed IP Camera initial data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109510998A CN109510998A (en) | 2019-03-22 |
CN109510998B true CN109510998B (en) | 2019-10-08 |
Family
ID=65754201
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811573718.4A Active CN109510998B (en) | 2018-12-21 | 2018-12-21 | The method for obtaining unpressed IP Camera initial data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109510998B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111757179A (en) * | 2020-06-28 | 2020-10-09 | 四川长虹电器股份有限公司 | Network camera localization system and method |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7886093B1 (en) * | 2003-07-31 | 2011-02-08 | Hewlett-Packard Development Company, L.P. | Electronic device network supporting compression and decompression in electronic devices |
US8031200B2 (en) * | 2008-05-22 | 2011-10-04 | Dell Products L.P. | Video matrix display interface |
CN100591089C (en) * | 2008-09-03 | 2010-02-17 | 广西师范大学 | Method for compressing and decompressing JPEG image without loss |
KR20100070046A (en) * | 2008-12-17 | 2010-06-25 | 삼성전자주식회사 | Apparatus and method for storing moving picture in digital image processing device |
CN101692349A (en) * | 2009-10-23 | 2010-04-07 | 中兴通讯股份有限公司 | Equipment and data storage and startup methods thereof |
CN101977061B (en) * | 2010-10-19 | 2012-12-26 | 广西师范大学 | Lossless compression and decompression method for general information |
CN202231824U (en) * | 2011-08-31 | 2012-05-23 | 华南理工大学 | Automatic recording device for network television based on driving of user statistical data |
CN103327284B (en) * | 2012-12-18 | 2018-11-06 | 南京中兴软件有限责任公司 | Transmission method, device and the video communications system of lossless video |
CN104125458B (en) * | 2013-04-27 | 2017-08-08 | 展讯通信(上海)有限公司 | Internal storage data lossless compression method and device |
CN103442204A (en) * | 2013-08-08 | 2013-12-11 | 浙江工业大学 | Network video transmission system and method based on DM365 |
CN104462147A (en) * | 2013-09-25 | 2015-03-25 | 天津书生投资有限公司 | Storage method for document |
-
2018
- 2018-12-21 CN CN201811573718.4A patent/CN109510998B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109510998A (en) | 2019-03-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6359656B1 (en) | In-band synchronization of data streams with audio/video streams | |
CN106453572B (en) | Method and system based on Cloud Server synchronous images | |
US20020107988A1 (en) | In-line compression system for low-bandwidth client-server data link | |
WO2018086099A1 (en) | Image processing method, apparatus and device, and video image transmission system | |
US6446155B1 (en) | Resource bus interface | |
CN105959620A (en) | Panorama video synchronization display method and panorama video synchronization display device | |
CN110392306A (en) | A kind of data processing method and equipment | |
CN112019900A (en) | DLNA (digital Living network alliance) -based screen projection method, system, equipment and storage medium | |
CN109510998B (en) | The method for obtaining unpressed IP Camera initial data | |
CN111083496A (en) | Data processing method and related product | |
CN111966647A (en) | Cloud storage method and device for small files, server and storage medium | |
US11057587B2 (en) | Compositing video signals and stripping composite video signal | |
CN103177037A (en) | Method for rapidly displaying multiframe medical images on browser | |
CN113032070B (en) | Host image intercepting method and device and related components | |
CN103353822A (en) | Method and device for acquiring file | |
CN108347615A (en) | A kind of spatial domain telescopic video transmission method solving screen resolution Heterogeneity | |
KR101012206B1 (en) | System and Method for Managing Image Transmission Volume of Web Viewer | |
CN1960512A (en) | Method for caching hypertext data in mobile communication terminal and mobile communication terminal thereof | |
CN107995524A (en) | A kind of FTP client FTP and its design, data processing method for connecting network video server | |
CN108347451B (en) | Picture processing system, method and device | |
CN104580521A (en) | Preloading method and system for client to smoothly access to server data | |
US7656433B2 (en) | Web camera | |
KR20020095756A (en) | Memory management method for mobile communication device | |
Guan et al. | Design and implementation of a remote video monitoring system based on embedded Linux | |
CN116720018A (en) | Picture loading method, picture loading device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |