1. Technical Field
Embodiments of the present disclosure relate to data encoding technology, and particularly to a method for encoding images and a corresponding server implementing the method.
2. Description of Related Art
Monitors have been used to perform security surveillance by capturing images of a number of monitored scenes, and sending the captured images to a monitor server. The monitor server encodes the captured images, and stores the encoded images into a storage devices of the monitor server. An administrator can obtain the encoded images of the monitored scenes from the storage device of the monitor server using a terminal device (e.g., a mobile phone) through a network.
However, because a size of a display screen of each kind of terminal devices is different, if the encoded image is bigger than the size of the display screen of the terminal device, some portions of the encoded images cannot be shown on the display screen of the terminal device. Therefore, an efficient method for encoding images is desired.
All of the processes described below may be embodied in, and fully automated via, functional code modules executed by one or more general purpose electronic devices or processors. The code modules may be stored in any type of non-transitory readable medium or other storage device. Some or all of the methods may alternatively be embodied in specialized hardware. Depending on the embodiment, the non-transitory readable medium may be a hard disk drive, a compact disc, a digital video disc, a tape drive or other suitable storage medium.
In one embodiment, the SVC coder 24 may be used to encode the captured images 20 according to the size of the display screen of each of the terminal devices T1, T2, and T3 to obtain encoded images 210 having different sizes, store the encoded images 210 in the storage device 21, and send back the encoded images 210 to the terminal devices T1, T2, and T3. A detailed description will be given in the following paragraphs.
As shown in
In one embodiment, the display screen 22 may be a liquid crystal display (LCD) or a touch-sensitive display, for example. The terminal device T1, T2, and T3 may be mobile phones, a personal digital assistants (PDAs), or any other suitable communication devices.
In one embodiment, the server 2 may include one or more modules. The one or more modules may comprise computerized code in the form of one or more programs that are stored in the storage device 21 (or memory). The computerized code includes instructions that are executed by the at least one processor 23 to provide functions for the one or more modules.
In block S1, the event listener 25 of the server 2 receives a specified type of an image request from a terminal device (e.g., the terminal device “T3”). In one embodiment, the specified type of the image request includes a size of the coding region of the captured image 20, a position of the coding region in the current image 20, and a corresponding coding rate of the coding region.
In block S2, the server 2 determines if the specified type of the image request has been processed by the SVC coder 24. In one embodiment, if the SVC coder 24 has encoded the captured images 20 of the specified type of the image request, the server 2 determines that the specified type of the image request has been processed by the SVC coder 24. If the specified type of the image request has been processed by the SVC coder 24, the procedure goes to block S3. If the specified type of the image request has not been processed by the SVC coder 24, the procedure goes to block S4. A detailed example is provided below to explain how to determine an image request.
In block S3, the server 2 obtains encoded images 210 from the storage device 21 of the server 2 according to the specified type of the image request, then the procedure goes to block S6.
In block S4, the server 2 adds a task into the SVC coder 24 to process the image request.
In block S5, the SVC coder 24 encodes the captured images 20 according to the image request, and stores the encoded images 210 and the corresponding specified type of the image request in the storage device 21.
In block S6, the server 2 outputs the encoded images 210 to the terminal device.
Referring to
If the terminal device “T2” sends the first image request with the first coding region “P1” and a second image request with the second coding region “P2” to the server 2. Because the first coding region “P1” has been processed by the SVC coder 24, the server 2 just processes the second image request with the second coding region “P2” using the SVC coder 24, and the encoded images 210 corresponding to the first image request can be obtained from the storage devices 21 directly.
In other embodiments, the SVC coder 24 may be replaced with other suitable coders according to different coding requests.
It should be emphasized that the above-described embodiments of the present disclosure, particularly, any embodiments, are merely possible examples of implementations, merely set forth for a clear understanding of the principles of the disclosure. Many variations and modifications may be made to the above-described embodiment(s) of the disclosure without departing substantially from the spirit and principles of the disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and the present disclosure and protected by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
99131130 | Sep 2010 | TW | national |