This application claims the priority benefit of Taiwan application serial no. 110132150, filed on Aug. 30, 2021. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of this specification.
The invention relates to a field of image processing, and particularly, relates to an image processing method related to image quality assessment.
In general image recognition, an image to be tested is first subjected to image quality assessment (IQA) to filter out images with image quality lower than a threshold. A current method is to upload the image to be tested to a cloud end and make a cloud server to execute a plurality of selected IQA methods.
Equipment that a user uses and a current network environment may affect transmission time required for an image processing device (a local end) to upload/download the image and a recognition result to/from the cloud server. Therefore, if the current network environment is poor, it requires too long time for the image processing device to upload the image till the image recognition result is received, which reduces and affects the efficiency of image processing. Moreover, if the image to be tested does not pass the IQA method executed by the cloud server, the user still has to wait for the time from uploading the image to receiving the result of image quality failure. In this way, the user must re-shoot the image or select a new image, and, as a result, sometimes the recognition efficiency of using the cloud server to perform the IQA methods is lower than the efficiency of judging the image quality by naked eyes of the user. Therefore, it is inconvenient in use.
Therefore, the invention is directed to an image processing method, in the image processing method, image quality assessment methods are divided into first type of image quality assessment methods and second type of image quality assessment methods based on individual execution times of the image quality assessment methods executed on a local end and a total execution time of a cloud server, so as to dynamically adjust the device performing the image quality assessment methods according to user equipment and a network environment, and therefore it is closer to actual conditions of the user equipment and the network environment.
The invention provides an image processing method, which is adapted to an image processing device. The image processing device has a processor and a storage unit, and is communicatively connected to a cloud server. The image processing method executes following steps according to instructions of the image processing device. A plurality of image quality assessment methods are received. A total execution time of a cloud server for executing the image quality assessment methods is calculated, and individual execution times of an image processing device for executing the image quality assessment methods on are calculated. The image quality assessment methods are classified into first type of image quality assessment methods and second type of image quality assessment methods according to the individual execution times and the total execution time. The first type of image quality assessment methods are performed by the image processing device, and the second type of image quality assessment methods are performed by the cloud server.
In summary, according to the image processing method of the embodiment of the invention, the device executing the image quality assessment methods is adaptively and dynamically adjusted according to equipment status of the image processing device and a network status of the user. In this way, when the time that the user equipment and network environment conditions require is too long, some or all of the image quality assessment methods may be allocated to the image processing device or processor of the local end to perform image quality assessment during image processing.
To make the aforementioned more comprehensible, several embodiments accompanied with drawings are described in detail as follows.
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
A part of the embodiments of the invention will be described in detail with reference of the accompanying drawings. The referential symbols in the following description will be regarded as the same or similar elements when the same referential symbols appear in different drawings. These embodiments are only a part of the invention, and not all of the possible implementations of the invention are disclosed. To be more precise, these embodiments are just examples of systems and methods within the scope of the patent application of the invention.
The storage unit 120 is used to store images, instructions, program codes, software modules, and other data. The storage unit may include a volatile storage circuit and a non-volatile storage circuit. The volatile storage circuit is used to store data in a volatile manner. For example, the volatile storage circuit may include a random access memory (RAM) or a similar volatile storage medium. The non-volatile storage circuit is used to store data in a non-volatile manner. For example, the non-volatile storage circuit may include a read only memory (ROM), a solid state disk (SSD) and/or traditional hard disk drive (HDD) or similar non-volatile storage media.
The display 130 may be implemented by a liquid crystal display (LCD), a plasma display, etc., or a touch screen with a touch module may also be used as the display 130.
The processor 110 is coupled to the storage unit 120 to control the entire or a part of the operations of the image processing device, and the process 110 is, for example, a central processing unit (CPU), or other programmable general purpose or special purpose microprocessor, a digital signal processor (DSP), a programmable controller, an application specific integrated circuit (ASIC), a programmable logic device (PLD), a graphics processing unit (GPU) or other similar devices, or a combination of these devices. The processor 110 may execute program codes, software modules, instructions, image quality assessment methods, default values of image processing, image recognition software, etc., that are recorded in the storage unit to implement the image processing method in the embodiment of the invention.
The processor 110 classifies the image quality assessment methods into a first type of image quality assessment methods and a second type of image quality assessment methods according to the individual execution times and the total execution time (step S240).
In another embodiment, the step that the processor 110 classifies the image quality assessment methods into the first type of image quality assessment methods IQA_G1 and the second type of image quality assessment methods IQA_G2 according to the individual execution times and the total execution time (step S240) further includes that: the processor 110 sequentially arranges the image quality assessment methods according to the individual execution times. For example, the image quality assessment method A, the image quality assessment method B, the image quality assessment method C, and the image quality assessment method D are sequentially arranged into the image quality assessment method B, the image quality assessment method C, the image quality assessment method D, and the image quality assessment method A according to their individual execution times of 7, 2, 3, and 6 seconds. Then, the processor 110 classifies the first N image quality assessment methods as the first type of image quality assessment methods IQA_G1, and classifies the remaining image quality assessment methods as the second type of image quality assessment methods IQA_G2. For example, the value N may be set to one-third or one-half of a total number of the image quality assessment methods. On the other hand, the value N may be the sum of the first N individual execution times of the sequentially arranged image quality assessment methods that is less than the total execution time. For example, regarding the first two image quality assessment methods B and C, a sum of the individual execution times thereof is 5 seconds, which is less than the total execution time of 9 seconds of the image quality assessment methods executed at the cloud end. In the embodiment, N is a positive integer.
After the step that the processor 110 divides the plurality of image quality assessment methods into the first type of image quality assessment methods and the second type of image quality assessment methods according to the individual execution times and the total execution time (step S220). The image processing method of the invention further includes that: the processor 110 classifies the image quality assessment methods into the first type of image quality assessment methods and the second type of image quality assessment methods, and outputs an allocation result IQA_CR. Then, the processor 110 stores the allocation result IQA_CR in the storage unit 120, and sets the allocation result IQA_CR as an image processing default value, and the image processing device 100 and the cloud server execute the subsequent image quality assessment methods according to the allocation result IQA_CR. To be specific, the processor 110 records a classified result in step S220 as the allocation result IQA_CR and stores the same in the storage unit 120 of the image processing device 100. Then, the processor 110 sets the allocation result IQA_CR to the image processing default value of the image processing device. In other words, the image processing device 100 (i.e., the local end) and the cloud server respectively perform the subsequent image quality assessment methods according to the allocation result IQA_CR in subsequent image processing of the image processing device 100. In other words, in the subsequent image processing process of the image processing device, the processor 110 executes the first type of image quality assessment methods IQA_G1 according to the allocation result IQA_CR, and the cloud server executes the second type of image quality assessment methods IQA_G2.
Before the step of calculating the total execution time of the plurality of image quality assessment methods on the cloud server (step S220), the image processing method of the invention further includes: it is tested whether the image processing device 100 respectively supports each image quality assessment method in the plurality of image quality assessment methods (step S211); and the image quality assessment methods that are not supported by the image processing device 100 are classified into the second type of image quality assessment methods IQA_G2. To be specific, the processor 110 tests whether the image processing device 100 supports each image quality assessment method, and classifies the image quality assessment methods that are not supported by the image processing device 100 into the second type of image quality assessment methods, so as to improve classification efficiency of the image quality assessment methods. For example, certain image quality assessment methods require a specific peripheral device or a specific graphics card. When the image processing device is not equipped with such specific peripheral device or such specific graphics card, the processor 110 directly classifies the image quality assessment methods that require the specific peripheral device or the specific graphics card into the second type of image quality assessment methods. In another embodiment, the processor 110 may classify the second type of image quality assessment methods IQA_G2 according to the execution time of the individual image quality assessment method being greater than a threshold. For example, the processor 110 classifies the image quality assessment methods with execution times greater than 5 seconds into the second type of image quality assessment methods IQA_G2, so as to speed up the image quality assessment performed by the image processing device 100.
After the step that the image processing device 100 executes the first type of image quality assessment methods, and the cloud server executes the second type of image quality assessment method (step S240), the image processing method of the present invention further includes following steps: the cloud server uses the image that has passed the second type of image quality assessment methods IQA_G2 on an image recognition model 2, and outputs an image recognition result RL; and the image processing device 100 executes the first type of image quality assessment methods to output an execution result, where if the execution result is passed, the image recognition result RL is displayed on the display 130; and if the execution result is not passed, the image recognition result RL is not used. To be specific, according to the allocation result IQA_CR of the processor 110, the cloud server executes the second type of image quality assessment methods IQA_G2 on a subsequent image Img_m that needs quality assessment. Then, the image Img_m that passes the second type of image quality assessment methods IQA_G2 is used for image recognition to output the image recognition result RL of the image.
It should be noted that the processor 110 of the image processing device 100 executes the first type of image quality assessment methods IQA_G1 on subsequent images that require quality assessment to output an execution result, and the processor 110 correspondingly displays or does not use the image recognition result RL output by the cloud server according to the execution result of the first type of image quality assessment methods IQA_G1. Specifically, if the execution result of the first type of image quality assessment methods IQA_G1 is passed, and the execution result of the second type of image quality assessment methods IQA_G2 executed by the cloud server is also passed and the image recognition result RL is output, the processor 110 receives the image recognition result RL and outputs and displays the same on the display 130 coupled to the processor 110. On the other hand, if the execution result of the first type of image quality assessment methods IQA_G1 executed by the processor 110 is not passed, the processor 110 does not use (i.e., ignore) the image recognition result RL output by the cloud server. In this way, the user may use the image processing method of the invention to improve the execution efficiency of image quality assessment in image processing and shorten the time required for the image quality assessment.
In summary, in the embodiment of the invention, when the user uses the image processing method to assist image quality assessment in image processing, the image quality assessment methods may be divided into the first type of image quality assessment methods and the second type of image quality assessment methods according to the individual execution times and the total execution time. Through the classification method, the image processing device located at the local end may execute the first type of image quality assessment methods, and the cloud server may execute the second type of image quality assessment methods, so that according to an equipment status of the image processing device of the local end and a connection status between the local end and the cloud server, a part of the image quality assessment methods are dynamically allocated for being executed on the local end (i.e., the image processing device), and another part of the image quality assessment methods are performed on the cloud server, so as to ameliorate the processing time of image quality assessment and improve the detection efficiency of the image processing method (i.e., image recognition).
It will be apparent to those skilled in the art that various modifications and variations can be made to the disclosed embodiments without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the invention covers modifications and variations provided they fall within the scope of the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
110132150 | Aug 2021 | TW | national |