CN109815012B - Image visible quality value searching method and related device - Google Patents

Image visible quality value searching method and related device Download PDF

Info

Publication number
CN109815012B
CN109815012B CN201811654772.1A CN201811654772A CN109815012B CN 109815012 B CN109815012 B CN 109815012B CN 201811654772 A CN201811654772 A CN 201811654772A CN 109815012 B CN109815012 B CN 109815012B
Authority
CN
China
Prior art keywords
image
quality value
visible quality
compressed
searching
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
Application number
CN201811654772.1A
Other languages
Chinese (zh)
Other versions
CN109815012A (en
Inventor
雷米·布莱顿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Idreamsky Technology Co ltd
Original Assignee
Shenzhen Idreamsky Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Idreamsky Technology Co ltd filed Critical Shenzhen Idreamsky Technology Co ltd
Priority to CN201811654772.1A priority Critical patent/CN109815012B/en
Publication of CN109815012A publication Critical patent/CN109815012A/en
Application granted granted Critical
Publication of CN109815012B publication Critical patent/CN109815012B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a method for searching an image visible quality value, which comprises the following steps: setting the number of search threads, an image visible quality value interval and a compressed image target score; distributing search threads in the image visible quality value interval according to the number of the search threads; compressing the image to be compressed according to the distributed search threads to obtain the compressed image score corresponding to each search thread; and searching the best image visible quality value corresponding to the image to be compressed according to the compressed image score and the compressed image target score. The invention also discloses a device and equipment for searching the visible quality value of the image, which solve the technical problem that the best compression setting is difficult to find in the prior art, and the compressed image can influence the visual quality.

Description

Image visible quality value searching method and related device
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a method and a related device for searching an image visible quality value.
Background
With the development of computer technology, more and more users transmit images using computers. Some users do not need such high definition images when sending or saving the images, because high definition images occupy a lot of memory and increase image transfer time. Many times, the user will choose to compress after the image is acquired, but it is difficult to find an optimal compression setting so that the compressed image does not change its visual quality, i.e., the compressed image has the best visual quality; the image size is reduced, and more memory is not occupied.
Disclosure of Invention
The embodiment of the disclosure provides an image visible quality value searching method, an image visible quality value searching device, image visible quality value searching equipment and a computer readable storage medium, so as to solve the technical problem of finding an optimal compression setting and enabling the compressed image not to change the visual quality after compression.
In a first aspect, a method for searching for a visual quality value of an image is disclosed, comprising:
setting the number of search threads, an image visible quality value interval and a compressed image target score;
distributing search threads in the image visible quality value interval according to the number of the search threads;
compressing the image to be compressed according to the distributed search threads to obtain the compressed image score corresponding to each search thread;
and searching the best image visible quality value corresponding to the image to be compressed according to the compressed image score and the compressed image target score.
The allocating search threads in the visible image quality value interval according to the number of the search threads comprises the following steps:
when the number of the visible quality values in the image visible quality interval is n times of the number of threads, if n is larger than a first threshold value, determining that the searching mode is a first searching mode, wherein the first searching enables each thread to execute searching according to preset interval distribution in the image visible quality threshold value;
If the n is smaller than or equal to a first threshold value, determining that the searching mode is a second searching mode, wherein the second searching enables each thread to execute searching in a sequential adjacent distribution mode from a maximum image visible quality value in the image visible quality interval;
and if the number of threads is less than 1, adjusting the number of threads to the number of visible quality values in the visible quality interval of the image, and then executing the second search.
The searching for the best image visible quality value corresponding to the image to be compressed according to the compressed image score and the compressed image target score comprises the following steps:
under the condition that the best image visible quality value corresponding to the image to be compressed is not found, adjusting the image visible quality value interval, and executing the distribution of search threads in the image visible quality value interval according to the number of the search threads;
and returning to the best image visible quality value and ending the search under the condition that the best image visible quality value corresponding to the image to be compressed is found.
Said adjusting said image visible quality value interval comprising:
the image visible quality value interval is adjusted according to the image visible quality values at threads corresponding to the compressed image target scores and close to the two compressed image scores.
And returning to the best image visible quality value and ending the search under the condition that the best image visible quality value corresponding to the image to be compressed is found, wherein the method comprises the following steps:
judging that the compressed image score corresponding to the image visible quality value distributed by the target thread is smaller than the compressed image target score, and the absolute value of the difference value between the compressed image score of the target thread and the compressed image target score is smaller than a second threshold;
and determining the image visible quality value distributed by the target thread as the optimal image visible quality value, returning to the optimal image visible quality value and ending the search.
Optionally, under the condition that the best image visible quality value corresponding to the image to be compressed is found, returning the best image visible quality value and ending the search, including:
judging that the compressed image score corresponding to the image visible quality value distributed by the target thread is smaller than the compressed image target score, and the compressed image score corresponding to the adjacent image visible quality value of the target thread is larger than the compressed image target score;
and determining the image visible quality value distributed by the target thread as the optimal image visible quality value, returning to the optimal image visible quality value and ending the search.
Optionally, when the compressed image score corresponding to the image visible quality value allocated by the target thread is smaller than the compressed image target score and the absolute value of the difference value between the compressed image score and the compressed image target score of the target thread is smaller than a second threshold value, the image visible quality value corresponding to the target thread with the minimum difference value is used as the optimal image visible quality value.
In a second aspect, an image visual quality value search apparatus is disclosed, the apparatus comprising:
the setting unit is used for setting the number of search threads, the visible image quality value interval and the target score of the compressed image;
the distribution unit is used for distributing the search threads in the image visible quality value interval according to the number of the search threads;
the scoring unit is used for distributing search threads in the image visible quality value interval according to the number of the search threads;
and the searching unit is used for searching the best image visible quality value corresponding to the image to be compressed according to the compressed image fraction and the compressed image target fraction.
The dispensing unit comprises:
the first distribution unit is used for determining that the searching mode is a first searching mode when the number of the visible quality values in the image visible quality interval is n times of the number of threads, and the first searching enables each thread to execute searching according to preset interval distribution in the image visible quality threshold value if the number of the visible quality values in the image visible quality interval is n times of the number of threads;
The second allocation unit is used for determining that the searching mode is second searching if the n is smaller than or equal to a first threshold value, and the second searching enables each thread to execute searching in a sequential adjacent distribution mode from a maximum image visible quality value in the image visible quality interval;
and the third distribution unit is used for executing the second search after adjusting the number of threads to the number of visible quality values in the visible quality interval of the image if the n is smaller than 1.
The search unit includes:
the first searching unit is used for adjusting the image visible quality value interval under the condition that the best image visible quality value corresponding to the image to be compressed is not found, and executing the searching thread distribution in the image visible quality value interval according to the searching thread quantity;
and the second searching unit is used for returning the best image visible quality value and ending the search under the condition of searching the best image visible quality value corresponding to the image to be compressed.
The first search unit includes:
and the adjusting unit is used for adjusting the image visible quality value interval according to the image visible quality values at the threads corresponding to the compressed image target scores and the compressed image scores.
The second search unit includes:
the judging unit is used for judging that the compressed image score corresponding to the image visible quality value distributed by the target thread is smaller than the compressed image target score, and the absolute value of the difference value between the compressed image score of the target thread and the compressed image target score is smaller than a second threshold value;
and the determining unit is used for determining that the image visible quality value distributed by the target thread is the optimal image visible quality value, returning to the optimal image visible quality value and ending the search.
In a third aspect, an image visual quality value search device is disclosed, comprising a processor and a memory, wherein the memory is for storing computer program code, the processor being configured to invoke the computer program code to perform the method as described in the first aspect above.
In a fourth aspect, a computer-readable storage medium is disclosed, storing computer-readable instructions that, when invoked by a processor, perform a method as in the first aspect described above.
In the embodiment of the disclosure, the number of search threads, the image visible quality value interval and the compressed image target score can be set; distributing search threads in the image visible quality value interval according to the number of the search threads; compressing the image to be compressed according to the distributed search threads to obtain the compressed image score corresponding to each search thread; and searching the best image visible quality value corresponding to the image to be compressed according to the compressed image score and the compressed image target score. Then, according to different modes of distributing threads in the image visible quality value interval according to the number of threads, the optimal image visible quality value can be found more effectively, the image visible quality value interval can be automatically adjusted, the optimal image visible quality value can be automatically found in the adjusted image visible quality value interval, the compressed image is set by using the optimal image visible quality value, the memory size occupied by the image to be compressed can be reduced, and the perceived quality of the image cannot be lost. When the number of the visible quality values in the image visible quality interval is n times of the number of threads, if n is larger than a first threshold value, determining that the searching mode is a first searching mode, wherein the first searching mode enables each thread to execute searching according to preset interval distribution in the image visible quality threshold value, and therefore when the searching range is relatively large, the searching can be fast performed, and a great amount of time is consumed due to searching of one value; if the n is smaller than or equal to a first threshold value, determining that the searching mode is a second searching mode, wherein the second searching enables each thread to execute searching in a sequential adjacent distribution mode from a maximum image visible quality value in the image visible quality interval; when the search range is relatively small, such that searching is performed in order of adjacent distribution starting from the maximum image visual quality value, it is possible to avoid missing the optimum value. If n is smaller than 1, the number of threads is adjusted to the number of visible quality values in the visible quality interval of the image, then the second search is executed, and when the search range is smaller than the number of threads, the number of threads is automatically adjusted, so that the calculated amount can be reduced.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the prior art, the drawings that are used in the description of the embodiments or the prior art will be briefly described below.
Wherein:
fig. 1 is a flowchart of an image visible quality value searching method provided by an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of performing 3-time image visual quality value searches provided by embodiments of the present disclosure;
fig. 3 is a schematic structural diagram of an image visible quality value searching apparatus provided in an embodiment of the present disclosure;
fig. 4 is a schematic structural view of an image visible quality value searching apparatus provided in an embodiment of the present disclosure.
Detailed Description
Technical solutions in the embodiments of the present disclosure will be clearly described below with reference to the drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, not all embodiments.
It is also to be understood that the terminology used in the description of the disclosure herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure.
It should be further understood that the term "and/or" as used in this disclosure and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
In a specific implementation, the method for searching the visible image quality value described in the embodiments of the present disclosure may be implemented by a terminal device with an image compression function, such as a mobile phone, a desktop computer, a laptop computer, and a wearable device, which is not limited herein. The embodiments of the present disclosure will be described with a terminal device as an execution body.
The embodiment of the disclosure provides an image visible quality value searching method, which comprises the following steps: setting the number of search threads, an image visible quality value interval and a compressed image target score; distributing search threads in the image visible quality value interval according to the number of the search threads; compressing the image to be compressed according to the distributed search threads to obtain the compressed image score corresponding to each search thread; and searching the best image visible quality value corresponding to the image to be compressed according to the compressed image score and the compressed image target score. The embodiment of the disclosure also provides a corresponding image visible quality value searching device and image visible quality value searching equipment. The following detailed description is given respectively.
In order to better understand an image visible quality value searching method, an image visible quality value searching device and an image visible quality value searching apparatus provided in the embodiments of the present disclosure, a flow of an image visible quality value searching method applicable to the embodiments of the present disclosure is described below. Please refer to the image visual quality value searching method shown in fig. 1.
And S100, setting the number of search threads, an image visible quality value interval and a compressed image target score.
Specifically, the number of the search threads may be 3, 4, 5 or more, or may be less, which is not limited herein, and it should be noted that the larger the number of threads, the faster the search speed, but the larger the number of threads, the larger the calculation amount. The image visible quality value interval may be 0-100, 0-50, 50-100, etc., but is not limited thereto, and it should be noted that the set interval value cannot be larger than the image visible quality of the image to be compressed, for example, if the image visible quality of the image to be compressed is 30, the image visible quality value interval may be 0-50, 0-100,20-50, etc.; but cannot be set to 30-50, 50-100,50-80, etc., which may result in searching for a less than optimal image visible quality value. The setting of the target score of the compressed image may be to obtain a score according to the comparison between the compressed image and the original image, when we need to compress the image size to the required size, the difference average opinion score may be obtained by comparing the difference between the compressed image and the original image, the score of the difference average opinion score under the condition of the best visual effect of the compressed image may be used as the target score of the compressed image, and according to the obtaining manner of the difference average opinion score, the smaller the difference between the compressed image and the original image may be, the target score may be 5 score, 4 score or the like, which is not limited herein.
Optionally, the number of threads is determined from the computational resources. For example, if the operation resources of the device running the image visual quality value searching method are rich, the number of threads may be set to be larger, and if the operation resources of the device running the image visual quality value searching method are tense, the number of threads may be set to be smaller, so that the image visual quality value searching method may be executed more efficiently.
Fig. 2 is a schematic diagram of performing 3 searches for visible quality values of an image according to an embodiment of the present disclosure, where, as shown in fig. 2, the number of search threads is 7, and the visible quality value interval of the image is 0-100, and is shown in the figure. The compressed image has a target score of 5 and is not displayed in the image. The number of threads and the image visibility value interval set in fig. 2 are only for example, and the number of search threads, the image visibility quality value interval, and the compressed image target score set in the present disclosure are better described.
S102, distributing search threads in the image visible quality value interval according to the number of the search threads.
Specifically, the set number of threads is searched in the image visible quality value interval according to a certain searching mode.
In one possible implementation manner, the allocating search threads in the image visible quality value interval according to the number of search threads includes: when the number of the visible quality values in the image visible quality interval is n times of the number of threads, if n is larger than a first threshold value, determining that the searching mode is a first searching mode, wherein the first searching enables each thread to execute searching according to preset interval distribution in the image visible quality threshold value; if the n is smaller than or equal to a first threshold value, determining that the searching mode is a second searching mode, wherein the second searching enables each thread to execute searching in a sequential adjacent distribution mode from a maximum image visible quality value in the image visible quality interval; and if the number of threads is less than 1, adjusting the number of threads to the number of visible quality values in the visible quality interval of the image, and then executing the second search. If n is larger than a first threshold, determining the searching mode as a first searching mode, wherein the first searching enables each thread to perform searching according to preset interval distribution in the image visible quality threshold, so that when the searching range is larger, the searching can be performed quickly, and a great amount of time is consumed due to searching one value by one value; if the n is smaller than or equal to a first threshold value, determining that the searching mode is a second searching mode, wherein the second searching enables each thread to execute searching in a sequential adjacent distribution mode from a maximum image visible quality value in the image visible quality interval; when the search range is relatively small, such that searching is performed in order of adjacent distribution starting from the maximum image visual quality value, it is possible to avoid missing the optimum value. If n is smaller than 1, the number of threads is adjusted to the number of visible quality values in the visible quality interval of the image, then the second search is executed, and when the search range is smaller than the number of threads, the number of threads is automatically adjusted, so that the calculated amount can be reduced.
Preferably, the first threshold is 2; when the first threshold is 2, the image visual quality value search algorithm can perform search more efficiently. To better explain, referring again to fig. 2, for an example, the number of visible quality values in the image visible quality value interval in fig. 2 is 100, the number of threads is 7, in the first search, 7 threads perform searches among 100 visible quality values, in order to enable 7 threads to effectively search for the best image visible quality value among 100 image visible quality values, 7 threads cannot search for each value among 100 image visible quality values, then a search mode is required to be allocated, 100 is about 14.4 times as high as 7, and when the first threshold is 2, the search mode is determined to be the first search, the first search causes each thread to perform searches within the image visible quality threshold at preset intervals, in fig. 2, the preset intervals are 12 and 13, and the image visible quality values allocated by the threads are 12, 24, 37, 50, 63, 76, 88, respectively. It should be noted that the preset interval is not limited and may be any number, but to ensure that the threads are distributed equally in the visible quality value interval as far as possible, if the number of visible quality values in the visible quality value interval can divide the number of threads, the result of dividing the number of threads by the number of visible quality values in the visible quality value interval is selected as the preset interval. When the second search is executed, the value of the visible quality value interval of the image is adjusted to 25-36, the number of the visible quality values in the visible quality value interval of the image is 12, the result of dividing 12 by 7 is smaller than 2, the search mode is determined to be the second search, and the second search enables each thread to execute the search in the visible quality interval of the image from the maximum visible quality value in sequence and adjacent distribution, namely, the thread starts from the visible quality value of the image to 36, and sequentially executes the searches at the visible quality values of the image to 36, 35, 34, 33, 32, 31 and 30. And in the third searching, the value of the visible quality value interval of the image is adjusted to 25-29, the number of the visible quality values in the visible quality value interval of the image is 5, at the moment, when n is smaller than 1, the number of threads is adjusted to the number of the visible quality values in the visible quality interval of the image, then the second searching is executed, namely, after the number of threads is adjusted to 5, the searching is executed in the visible quality value interval of the image from the maximum visible quality value in a sequential adjacent distribution mode.
S104, compressing the image to be compressed according to the distributed search threads to obtain the compressed image score corresponding to each search thread.
Specifically, each thread distributes an image visible quality value in an image visible quality value interval for searching, a compressed image is compressed according to the distributed image visible quality value, and then a score is given according to the difference between the compressed image and the original image, so that the compressed image score corresponding to each searching thread is obtained.
For better explanation, please refer to table 1 together with fig. 2, the corresponding thread in table 1 is the thread in the first search in fig. 2, for convenience of description, the threads in the first search in fig. 2 are numbered 1-7 from left to right, each thread is assigned an image visible quality value according to the search mode, the image visible quality value of each thread is utilized to compress the image to be compressed, for example, at the first thread, the image visible quality value is 12, then the compressed image is compressed into a compressed image with the image visible quality value of 12, and then the compressed image is compared with the original image to obtain a score of 6.467991; the visual quality value of the image at the second thread is 24, then the compressed image with the visual quality value of the image is compressed into a compressed image with the visual quality value of the image being 24, and then the compressed image is compared with the original image to obtain a score of 5.369439, and the compressed image scores corresponding to each search thread are obtained at other threads in this way, which is not described in detail herein.
And S106, searching the best image visible quality value corresponding to the image to be compressed according to the compressed image score and the compressed image target score.
Specifically, according to the compressed image score and the compressed image target score, firstly, selecting a thread with the compressed image score smaller than the compressed image target score to analyze, and judging whether the condition is met, if so, determining the best image visible quality value corresponding to the image to be compressed, and if not, executing the next search.
In one possible implementation manner, the searching for the best image visible quality value corresponding to the image to be compressed according to the compressed image score and the compressed image target score includes: under the condition that the best image visible quality value corresponding to the image to be compressed is not found, adjusting the image visible quality value interval, and executing the distribution of search threads in the image visible quality value interval according to the number of the search threads; and returning to the best image visible quality value and ending the search under the condition that the best image visible quality value corresponding to the image to be compressed is found.
In one possible implementation, the adjusting the image visible quality value interval includes: the image visible quality value interval is adjusted according to the image visible quality values at threads corresponding to the compressed image target scores and close to the two compressed image scores. For example, referring to the second search in fig. 2, the image visible quality value interval is adjusted to 25-36 according to the image visible quality values 24 and 37 at the two closest threads in the first search, so that repeated searches can be avoided and the search time can be saved.
In one possible implementation manner, in the case of finding the best image visible quality value corresponding to the image to be compressed, returning the best image visible quality value and ending the search, including: judging that the compressed image score corresponding to the image visible quality value distributed by the target thread is smaller than the compressed image target score, and the absolute value of the difference value between the compressed image score of the target thread and the compressed image target score is smaller than a second threshold; and determining the image visible quality value distributed by the target thread as the optimal image visible quality value, returning to the optimal image visible quality value and ending the search. Preferably, the second threshold is 0.250000. For example, referring to table 1 and fig. 2, the target score of the compressed image is 5, only the second and the ground three threads are closest to 5, but less than 5, if the visual quality of the image is beyond 5, the texture feature in the compressed image may not be seen, the third thread corresponds to the compressed image score being less than the target score of the compressed image and possibly meeting the requirement, and as the target thread, further analysis is performed to compare the absolute value of the difference between the target scores of the compressed image and the compressed image with the second threshold, the absolute value of the difference is 1.233334, and is greater than 0.250000, and the second search is performed if the visual quality of the image is not meeting the requirement.
Optionally, under the condition that the best image visible quality value corresponding to the image to be compressed is found, returning the best image visible quality value and ending the search, including: judging that the compressed image score corresponding to the image visible quality value distributed by the target thread is smaller than the compressed image target score, and the compressed image score corresponding to the adjacent image visible quality value of the target thread is larger than the compressed image target score; and determining the image visible quality value distributed by the target thread as the optimal image visible quality value, returning to the optimal image visible quality value and ending the search.
Optionally, when the compressed image score corresponding to the image visible quality value allocated by the target thread is smaller than the compressed image target score and the absolute value of the difference value between the compressed image score and the compressed image target score of the target thread is smaller than a second threshold value, the image visible quality value corresponding to the target thread with the minimum difference value is used as the optimal image visible quality value.
In the embodiment of the disclosure, the number of search threads, the image visible quality value interval and the compressed image target score can be set; distributing search threads in the image visible quality value interval according to the number of the search threads; compressing the image to be compressed according to the distributed search threads to obtain the compressed image score corresponding to each search thread; and searching the best image visible quality value corresponding to the image to be compressed according to the compressed image score and the compressed image target score. Then, according to different modes of distributing threads in the image visible quality value interval according to the number of threads, the optimal image visible quality value can be found more effectively, the image visible quality value interval can be automatically adjusted, the optimal image visible quality value can be automatically found in the adjusted image visible quality value interval, the compressed image is set by using the optimal image visible quality value, the memory size occupied by the image to be compressed can be reduced, and the perceived quality of the image cannot be lost. When the number of the visible quality values in the image visible quality interval is n times of the number of threads, if n is larger than a first threshold value, determining that the searching mode is a first searching mode, wherein the first searching mode enables each thread to execute searching according to preset interval distribution in the image visible quality threshold value, and therefore when the searching range is relatively large, the searching can be fast performed, and a great amount of time is consumed due to searching of one value; if the n is smaller than or equal to a first threshold value, determining that the searching mode is a second searching mode, wherein the second searching enables each thread to execute searching in a sequential adjacent distribution mode from a maximum image visible quality value in the image visible quality interval; when the search range is relatively small, such that searching is performed in order of adjacent distribution starting from the maximum image visual quality value, it is possible to avoid missing the optimum value. If n is smaller than 1, the number of threads is adjusted to the number of visible quality values in the visible quality interval of the image, then the second search is executed, and when the search range is smaller than the number of threads, the number of threads is automatically adjusted, so that the calculated amount can be reduced.
The image visible quality value searching method provided by the disclosure can directly use the searched optimal image visible quality value in the compression software to set the compression software to compress the image, or directly use the image visible quality value searching method to compress the image to increase the transmission speed when the chat tool sends the image, or use the method provided by the disclosure to compress the image in the game when playing the game, and can also use the optimal image visible quality value to compress the shot image directly after shooting the image, so that the image visible quality value searching method is not limited herein.
In order to facilitate better implementation of the foregoing solutions of the embodiments of the present disclosure, the present disclosure further correspondingly provides an image visible quality value searching apparatus, which is described in detail below with reference to the accompanying drawings:
as shown in fig. 3, the structure schematic diagram of the image visible quality value searching apparatus provided in the embodiment of the present disclosure may include: a setting unit 100, an allocation unit 102, a scoring unit 104 and a finding unit 106,
wherein, the liquid crystal display device comprises a liquid crystal display device,
a setting unit 100 for setting the number of search threads, the image visible quality value interval, and the compressed image target score;
An allocation unit 102, configured to allocate search threads in the visible quality value interval of the image according to the number of search threads;
a scoring unit 104, configured to allocate search threads in the visible quality value interval of the image according to the number of search threads;
and the searching unit 106 is configured to search for an optimal image visible quality value corresponding to the image to be compressed according to the compressed image score and the compressed image target score.
A distribution unit 102 comprising:
the first distribution unit is used for determining that the searching mode is a first searching mode when the number of the visible quality values in the image visible quality interval is n times of the number of threads, and the first searching enables each thread to execute searching according to preset interval distribution in the image visible quality threshold value if the number of the visible quality values in the image visible quality interval is n times of the number of threads;
the second allocation unit is used for determining that the searching mode is second searching if the n is smaller than or equal to a first threshold value, and the second searching enables each thread to execute searching in a sequential adjacent distribution mode from a maximum image visible quality value in the image visible quality interval;
and the third distribution unit is used for executing the second search after adjusting the number of threads to the number of visible quality values in the visible quality interval of the image if the n is smaller than 1.
The search unit 106 includes:
the first searching unit is used for adjusting the image visible quality value interval under the condition that the best image visible quality value corresponding to the image to be compressed is not found, and executing the searching thread distribution in the image visible quality value interval according to the searching thread quantity;
and the second searching unit is used for returning the best image visible quality value and ending the search under the condition of searching the best image visible quality value corresponding to the image to be compressed.
The first search unit includes:
and the adjusting unit is used for adjusting the image visible quality value interval according to the image visible quality values at the threads corresponding to the compressed image target scores and the compressed image scores.
The second search unit includes:
the judging unit is used for judging that the compressed image score corresponding to the image visible quality value distributed by the target thread is smaller than the compressed image target score, and the absolute value of the difference value between the compressed image score of the target thread and the compressed image target score is smaller than a second threshold value;
and the determining unit is used for determining that the image visible quality value distributed by the target thread is the optimal image visible quality value, returning to the optimal image visible quality value and ending the search.
It should be noted that, the image visible quality value searching apparatus 10 in the embodiment of the present disclosure is the image visible quality value searching apparatus in the embodiment of fig. 1 to 2, and the functions of each unit in the image visible quality value searching apparatus 10 may correspond to the specific implementation manner of the embodiment of fig. 1 to 2 in each method embodiment and are not described herein again.
In order to facilitate better implementation of the foregoing solutions of the embodiments of the present invention, the present invention correspondingly provides an image visible quality value searching apparatus, and the following details are described with reference to the accompanying drawings:
as shown in fig. 4, the image visual quality value searching apparatus 110 may include a processor 1101, an input unit 1102, an output unit 1103, a memory 1104, and a communication unit 1105, where the processor 1101, the input unit 1102, the output unit 1103, the memory 1104, and the communication unit 1105 may be connected to each other through a bus 1106. The memory 1104 may be a high-speed RAM memory or a nonvolatile memory (non-volatile memory), such as at least one disk memory. The memory 1104 may also optionally be at least one storage system located remotely from the processor 1101. The memory 1104 is used for storing application program codes and may include an operating system, a network communication module, a user interface module and an image visible quality value search program, and the communication unit 1105 is used for information interaction with an external unit; the processor 1101 is configured to invoke the program code to perform the steps of:
The processor 1101 sets the number of search threads, the image visible quality value interval, and the compressed image target score;
processor 1101 allocates search threads in the image visible quality value interval according to the number of search threads;
the processor 1101 compresses the image to be compressed according to the distributed search threads to obtain the compressed image score corresponding to each search thread;
the processor 1101 searches for an optimal image visible quality value corresponding to the image to be compressed according to the compressed image score and the compressed image target score.
It should be noted that, the image visible quality value searching device 110 in the embodiment of the present disclosure is the image visible quality value searching device in the embodiment of fig. 1 to 2, and the specific reference may be made to the specific implementation manner of the embodiment of fig. 1 to 2 in the embodiments of the methods described above, which is not repeated herein.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a usb disk, a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
The present disclosure may be a system, method, and/or computer program product. The computer program product may include a computer readable storage medium having computer readable program instructions embodied thereon for causing a processor to implement aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: portable computer disks, hard disks, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static Random Access Memory (SRAM), portable compact disk read-only memory (CD-ROM), digital Versatile Disks (DVD), memory sticks, floppy disks, mechanical coding devices, punch cards or in-groove structures such as punch cards or grooves having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media, as used herein, are not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., optical pulses through fiber optic cables), or electrical signals transmitted through wires.
The computer readable program instructions described herein may be downloaded from a computer readable storage medium to a respective computing/processing device or to an external computer or external storage device over a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers and/or edge servers. The network interface card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium in the respective computing/processing device.
Computer program instructions for performing the operations of the present disclosure can be assembly instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, c++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present disclosure are implemented by personalizing electronic circuitry, such as programmable logic circuitry, field Programmable Gate Arrays (FPGAs), or Programmable Logic Arrays (PLAs), with state information of computer readable program instructions, which can execute the computer readable program instructions.
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable medium having the instructions stored therein includes an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The foregoing disclosure is merely illustrative of the presently preferred embodiments of the present disclosure, and it is not intended to limit the scope of the claims hereof, as defined by the appended claims.

Claims (10)

1. A method for searching for a visual quality value of an image, comprising:
setting the number of search threads, an image visible quality value interval and a compressed image target score;
distributing search threads in the image visible quality value interval according to the number of the search threads;
compressing the image to be compressed according to the distributed search threads to obtain the respective compressed image score of each search thread, including: compressing the image to be compressed by utilizing the image visible quality value distributed by each search thread in the image visible quality value interval to obtain a compressed image, and scoring according to the difference between the compressed image and the image to be compressed to obtain the compressed image score corresponding to each search thread;
and searching the best image visible quality value corresponding to the image to be compressed according to the compressed image score and the compressed image target score.
2. The method of claim 1, wherein said assigning search threads in said image visible quality value interval according to said number of search threads comprises:
When the number of the visible quality values in the image visible quality value interval is n times of the number of threads, if n is larger than a first threshold value, determining a searching mode to be a first searching mode, wherein each thread executes searching according to preset interval distribution in the image visible quality value interval by the first searching mode;
if the n is smaller than or equal to a first threshold value, determining a searching mode as a second searching mode, wherein the second searching enables each thread to execute searching from the largest image visible quality value to the adjacent distribution in sequence in the image visible quality value interval;
and if the number n is smaller than 1, adjusting the number of threads to the number of visible quality values in the visible quality value interval of the image, and then executing the second search.
3. The method according to claim 1, wherein the searching for the best image visible quality value corresponding to the image to be compressed according to the compressed image score and the compressed image target score comprises:
under the condition that the best image visible quality value corresponding to the image to be compressed is not found, adjusting the image visible quality value interval, and executing the distribution of search threads in the image visible quality value interval according to the number of the search threads;
And returning to the best image visible quality value and ending the search under the condition that the best image visible quality value corresponding to the image to be compressed is found.
4. A method according to claim 3, wherein said adjusting said image visible quality value interval comprises:
the image visible quality value interval is adjusted according to the image visible quality values at threads corresponding to the compressed image target scores and close to the two compressed image scores.
5. A method according to claim 3, wherein, in the case of finding the best image visible quality value corresponding to the image to be compressed, returning the best image visible quality value and ending the search, includes:
judging that the compressed image score corresponding to the image visible quality value distributed by the target thread is smaller than the compressed image target score, and the absolute value of the difference value between the compressed image score and the compressed image target score of the target thread is smaller than a second threshold;
and determining the image visible quality value distributed by the target thread as the optimal image visible quality value, returning to the optimal image visible quality value and ending the search.
6. An image visual quality value search apparatus, comprising:
The setting unit is used for setting the number of search threads, the visible image quality value interval and the target score of the compressed image;
the distribution unit is used for distributing the search threads in the image visible quality value interval according to the number of the search threads;
the scoring unit is used for compressing the image to be compressed according to the distributed search threads to obtain the respective corresponding compressed image score of each search thread, and comprises the following steps: compressing the image to be compressed by utilizing the image visible quality value distributed by each search thread in the image visible quality value interval to obtain a compressed image, and scoring according to the difference between the compressed image and the image to be compressed to obtain the compressed image score corresponding to each search thread;
and the searching unit is used for searching the best image visible quality value corresponding to the image to be compressed according to the compressed image fraction and the compressed image target fraction.
7. The apparatus of claim 6, wherein the distribution unit comprises:
the first distribution unit is used for determining a searching mode as a first searching mode when the number of the visible quality values in the image visible quality value interval is n times of the number of threads, and the first searching enables each thread to execute searching according to preset interval distribution in the image visible quality value interval if the number of the visible quality values in the image visible quality value interval is n times of the number of threads;
The second allocation unit is used for determining that the searching mode is second searching if the n is smaller than or equal to the first threshold value, and the second searching enables each thread to execute searching in the image visible quality value interval from the largest image visible quality value in a sequential adjacent distribution mode;
and the third distribution unit is used for adjusting the number of threads to the number of visible quality values in the visible quality value interval of the image and executing the second search if the n is smaller than 1.
8. The apparatus of claim 6, wherein the lookup unit comprises:
the first searching unit is used for adjusting the image visible quality value interval under the condition that the best image visible quality value corresponding to the image to be compressed is not found, and executing the searching thread distribution in the image visible quality value interval according to the searching thread quantity;
and the second searching unit is used for returning the best image visible quality value and ending the search under the condition of searching the best image visible quality value corresponding to the image to be compressed.
9. The apparatus of claim 8, wherein the first lookup unit comprises:
And the adjusting unit is used for adjusting the image visible quality value interval according to the image visible quality values at the threads corresponding to the compressed image target scores and the compressed image scores.
10. The apparatus of claim 9, wherein the second lookup unit comprises:
the judging unit is used for judging that the compressed image score corresponding to the image visible quality value distributed by the target thread is smaller than the compressed image target score, and the absolute value of the difference value between the compressed image score of the target thread and the compressed image target score is smaller than a second threshold value;
and the determining unit is used for determining that the image visible quality value distributed by the target thread is the optimal image visible quality value, returning to the optimal image visible quality value and ending the search.
CN201811654772.1A 2018-12-29 2018-12-29 Image visible quality value searching method and related device Active CN109815012B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811654772.1A CN109815012B (en) 2018-12-29 2018-12-29 Image visible quality value searching method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811654772.1A CN109815012B (en) 2018-12-29 2018-12-29 Image visible quality value searching method and related device

Publications (2)

Publication Number Publication Date
CN109815012A CN109815012A (en) 2019-05-28
CN109815012B true CN109815012B (en) 2023-08-18

Family

ID=66603329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811654772.1A Active CN109815012B (en) 2018-12-29 2018-12-29 Image visible quality value searching method and related device

Country Status (1)

Country Link
CN (1) CN109815012B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104517262A (en) * 2015-01-12 2015-04-15 广西大学 Self-adaption image scaling method for visual-saliency detection based on DCT-domain
CN106412583A (en) * 2015-07-27 2017-02-15 中兴通讯股份有限公司 Image compression method and device
CN106937111A (en) * 2015-12-31 2017-07-07 纳宝株式会社 Optimize the method and system of image compression quality

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120201475A1 (en) * 2009-10-05 2012-08-09 I.C.V.T. Ltd. Method and system for processing an image
US10506196B2 (en) * 2017-04-01 2019-12-10 Intel Corporation 360 neighbor-based quality selector, range adjuster, viewport manager, and motion estimator for graphics

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104517262A (en) * 2015-01-12 2015-04-15 广西大学 Self-adaption image scaling method for visual-saliency detection based on DCT-domain
CN106412583A (en) * 2015-07-27 2017-02-15 中兴通讯股份有限公司 Image compression method and device
CN106937111A (en) * 2015-12-31 2017-07-07 纳宝株式会社 Optimize the method and system of image compression quality

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
静态图像压缩评估方法测评;文义红等;《中国空间科学技术》;20100228(第1期);第72-77页 *

Also Published As

Publication number Publication date
CN109815012A (en) 2019-05-28

Similar Documents

Publication Publication Date Title
JP6504212B2 (en) Device, method and system
EP3410302B1 (en) Graphic instruction data processing method, apparatus
CN104854539A (en) Object searching method and device
CN112102448B (en) Virtual object image display method, device, electronic equipment and storage medium
US20160162597A1 (en) Intelligent browser-based display tiling
CN109862100B (en) Method and device for pushing information
US9721359B2 (en) Apparatus and method of decompressing rendering data and recording medium thereof
US20170142454A1 (en) Third-party video pushing method and system
JP6745020B2 (en) Method, computer program, computer-readable recording medium and device
CN104104995A (en) Image display method and device
CN111176582A (en) Matrix storage method, matrix access device and electronic equipment
CN109815012B (en) Image visible quality value searching method and related device
CN111176838B (en) Method and device for distributing embedded vector to node in bipartite graph
CN112929728A (en) Video rendering method, device and system, electronic equipment and storage medium
CN112163143A (en) Page switching method, device, equipment and storage medium
CN111177479A (en) Method and device for acquiring feature vectors of nodes in relational network graph
CN114374703B (en) Cloud mobile phone information acquisition method, device, equipment and storage medium
CN112672202B (en) Bullet screen processing method, equipment and storage medium
CN111625745B (en) Recommendation method, recommendation device, electronic equipment and computer readable medium
CN112839071B (en) Training system, training data access method and device, electronic equipment and medium
CN113784217A (en) Video playing method, device, equipment and storage medium
CN105469433B (en) Picture compression method and equipment thereof
CN110825477A (en) Method, device and equipment for loading graphical interface and storage medium
CN114979471B (en) Interface display method, device, electronic equipment and computer readable storage medium
CN113065011B (en) Picture determination method and device

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