1. Field of the Invention
The present invention relates to an image transmission and preview system and method thereof, and more particularly to a system and method for real time image transmission and preview.
2. The Related Art
Accordingly, an object of the present invention is to provide a system for real time image transmission and preview. The system for real time image transmission and preview is applied on a scanner and an electrical device. The scanner has a predetermined format therein for scanning a document based on the predetermined format. The scanner further scans the document in lines along a direction repeatedly. The scanner is capable of promptly getting an image and then wirelessly sending the image out after each linearly scanning a part of the document along the direction. The electrical device has a display module therein. The electrical device wirelessly receives the predetermined format information and the image sent out by the scanner, and further edits a format of the image to fit in with the predetermined format so as to make the image capable of being displayed by the display module. The display module of the electrical device promptly displays the image thereon after each linearly scanning a part of the document along the direction and the corresponding image get thereby is received by the electrical device.
Accordingly, another embodiment of the invention is to provide a method for real time image transmission and preview applied to a scanner and an electrical device. The electrical device includes a display module. The method comprises steps as follows:
As described above, the system for real time image transmission and preview and the method thereof can be used in the wireless network, and there is the image format adapted to be displayed by the electrical device predetermined in the system. So the scanner immediately sends the partial image to the electrical device after each scanning a part of the document, and the electrical device receives the partial image and instantaneously displays the partial image according to the predetermined image format. Thus the image can be transmitted and previewed by the system in real time.
The present invention will be apparent to those skilled in the art by reading the following description thereof, with reference to the attached drawings, in which:
Referring to the drawings in greater detail, and first to
With reference to
The image sent by the wireless transfer unit 13 is received by the wireless module 53 and then is stored in the second memory 52 of the e-book 5. The second processor 51 reads the image from the second memory 52 and then displays the image on the display module 50. In detail embodiment, the wireless transfer unit 13 may be a USB wireless transfer unit which converts a USB signal to the WIFI signal, and the e-book 5 may be a WIFI module.
The scanning module 10 under the control of the first processor 11 moves back and forth repeatedly to scan the document. For example, the scanning module 10 scans the document from top to bottom repeatedly and scans a part of the document each time, until completes the overall scanning of the document after several repeated scanning. After one scanning of the document from top to bottom is finished by the scanning module 10 to generate a partial image, the first processor 11 stores the partial image in the first memory 12. Then the partial image is transmitted to the e-book 5 by the wireless transfer unit 13 connecting with the wireless module 53. The second processor 51 reads the partial image from the handy scanner 1 and makes the partial image stored in the second memory 52. The second processor 51 further edits a format of the partial image to fit in with a predetermined format that can be displayed on the display module 50. As a result, the system for real time image transmission and preview 100 can display the image in real time.
Please refer to
The method for real time image transmission and preview 6 comprises a method for real time image transmission 60 applied to the handy scanner 1 and a method for real time image preview 65 applied to the e-book 5. Please refer to
Step 600, while the handy scanner 1 is powered on, the first processor 11 reads the program in the first memory 12 to control the operation of the handy scanner 1 and start the real time image transmission of the system 100. When the handy scanner 1 is in a standby mode, the first processor 11 generates a standby information packet.
Step 601, the standby information packet is sent to the wireless transfer unit 13 by the first processor 11, and then is sent out by the wireless transfer unit 13 in the form of WIFI signals.
Step 602, the first processor 11 determines whether the scanning module 10 has began to scan the document or not. If not, the handy scanner 1 maintains the standby mode.
Step 603, when the scanning module 10 has began to scan the document, the first processor 11 generates a format information packet. The format information packet has the code field thereof written in with 0X01, the length field thereof written in with 1, and the data field thereof written in with corresponding data based on different scanning formats of the scanning module 10. In this embodiment, the handy scanner 1 may have four kinds of different scanning formats which are color high-resolution scanning, color low-resolution scanning, gray high-resolution scanning and gray low-resolution scanning, respectively. The data field of the format information packet is written with 0, 1, 2 or 3 according to the different scanning formats described above respectively, which provides a basis for distinguishing the scanning format in which the document will be scanned by the handy scanner 1. The image from scanning the document may be compressed in JPEG format. The image may have a size of 10 inches in length and 5 inches in width. In detail embodiment, the compression format and size of the image may be achieved by other modes.
Step 604, the format information packet is transmitted to the wireless transfer unit 13 by the first processor 11, and then is sent out by the wireless transfer unit 13.
Step 605, the first processor 11 determines the scanning progress of the scanning module 10 scanning the document.
Step 606, when the scanning progress is broken off, the first processor 11 generates a stopping information packet which has the code field thereof written in with 0X40, the length field thereof written in with 0 and the data field thereof be none. The stopping information packet indicates that the handy scanner 1 has stopped scanning the document. In detail embodiment, the scanning progress can be manually broken off by means of pressing the button 14 of the handy scanner 1, or automatically broken off on account of any accidental conditions detected by the first processor 11.
Step 607, the stopping information packet is transmitted to the wireless transfer unit 13 by the first processor 11, and then is sent out by the wireless transfer unit 13.
Step 612, when the scanning of the document is completed in full, the first processor 11 generates a completion information packet which has the code field thereof written in with 0XFF, the length field thereof written in with the size of the header of the predetermined image format, and the data field thereof written in with corresponding data of the header of the predetermined image format. For example, if the size of the header of the predetermined image format is 5 bits, the length field of the completion information packet has a value 5 therein. At this time, the document has been scanned from stem to stern by the handy scanner 1, and the complete image get thereby has been transmitted to the wireless device, such as the e-book 5. Then, the step 600 may need to be re-executed.
Step 608, in the step 605, if the scanning progress is normal, the scanning module 10 moves in lines repeatedly to scan the document part by part.
Step 609, after the scanning module 10 scans the document to generate at least one partial image, the first processor 11 figures out the size of the partial image and then generates a partial image information packet which has the code field thereof written in with 0X02, the length field thereof written in according to the size of the partial image, and the data field thereof written in with corresponding data of the partial image. For example, if the size of the partial image is 256 bits, the length field of the partial image information packet has a value 256 therein.
Step 610, the first processor 11 transmits the partial image information packet to the wireless transfer unit 13, and then the partial image information packet is sent out by the wireless transfer unit 13. Then the foregoing system 100 re-executes the step 605.
Please refer to
Step 650, while the e-book 5 is powered on, the second processor 51 reads the data in the second memory 52 to control the operation of the e-book 5 and start the real time image preview of the system 100. Meanwhile, the second processor 51 also controls the wireless module 53 to receive the standby information packet sent by the wireless transfer unit 13 of the handy scanner 1, and reads the data written in the code field of the standby information packet to further control the action of the e-book 5. If 0X00 is written in the code field, it represents that the handy scanner 1 maintains the standby state.
Step 651, the second processor 51 judges the scanning progress of the handy scanner 1 scanning the document according to the data in the code field. If the data of the code field is 0X40, it represents that the scanning progress of the handy scanner 1 is broken off. As a result, the program in the second memory 52 returns to execute the step 650.
Step 652, when 0X01 is written in the code field, it represents that the handy scanner 1 has began to scan the document. The second processor 51 receives an image format information packet.
Step 653, the second processor 51 further reads the data written in the data field of the format information packet to determine the format of the image. As described above, the data 0, 1, 2 and 3 represent the color high-resolution format, the color low-resolution format, the gray high-resolution format, and the gray low-resolution format respectively.
Step 654, the second processor 51 judges whether the data in the code field of the information packet is 0XFF or not. If the scan is cancelled or generates an error, the program in the second memory 52 returns to execute the step 650.
Step 658, when the data in the code field is not 0XFF, the second processor 51 records the format information of the image and further builds a memory space according to the format information of the image.
Step 659, when the code field is written in with 0X02, it represents that the information packet received by the wireless module 53 is an image information packet. Then, the second processor 51 reads the data in the length field and the data field of the image information packet to get an image data, and further stores the image data in the memory space created in the step 658 so as to drive the display module 50 to properly display the image. In detail embodiment, if the second processor 51 has not built a suitable memory space according to the format information of the image, but uses a fixed-capacity memory space to store the image data, the second processor 51 finally still can drive the display module 50 to properly display the image according to the size of the image format that can be displayed on the display module 50. For example, if the fixed-capacity memory space can store an image having a length of 20 inches and a width of 8.5 inches, but the image adapted for being displayed on the display module 50 needs meet the size of the image format with 10 inches in length and 8.5 inches in width, the second processor 51 still can read the image data stored in the fixed-capacity memory space to fit in with the image format with 10 inches in length and 8.5 inches in width, and further performs a termination code for properly displaying the image on the display module 50. In detail embodiment, the image may be compressed in a JPEG format, so the second processor 51 needs to add a termination code of FFD9 in the image so as to make the image displayed by the display module 50 in the JPEG format. Then the step 652 may be re-executed.
Step 655, when the data in the code field is 0XFF, it represents that the handy scanner 1 has completed the scanning of the document in full. Namely, the progress of the real time image transmission has been completed. Then, the second processor 51 reads the header length in the length field of the completion information packet and the header data in the data field of the completion information packet.
Step 656, the second processor 51 adds the header data in the data field of the completion information packet into the image to make the display module 50 display a full image of the document thereon.
Step 657, the second processor 51 stores the full image with a single image file, such as a JPEG file. By now, the real time image preview of the system 100 is completed. Then, the step 650 may need to be re-executed.
As described above, the system for real time image transmission and preview 100 and the method 6 thereof can be used in the wireless network, and there is the image format adapted to be displayed by the e-book 5 predetermined in the system 100. So the handy scanner 1 immediately sends the partial image to the e-book 5 after each scanning a part of the document, and the e-book 5 receives the partial image and instantaneously displays the partial image according to the predetermined image format. Thus the image can be transmitted and previewed by the system 100 in real time.