Image thumbnail generation method and device and terminal
A thumbnail and image technology, applied in the field of communication, can solve problems such as poor accuracy of image content information, failure to consider image content information, thumbnails cannot fully express content information, etc.
Active Publication Date: 2014-04-09
XIAOMI INC
4 Cites 13 Cited by
AI-Extracted Technical Summary
Problems solved by technology
[0003] However, the above method only considers the spatial position information of the image, and does not consider the content information of the image at all, which will cause the generated thumbnail to sometimes not fully express the content information of the original image
Fo...
Method used
[0136] Referring to FIG. 3b, it is a schematic diagram of the process of generating thumbnails provided by this embodiment. Among them, (1) is the original image. (2) is the result of filtering the original image using the Laplacian edge filter operator, where the edge intensity value of each pixel in the image is also normalized, and the value range after processing is 0~255. (3) It is the result of using the pre-established attention model to calculate the spatial position attention value of each pixel in the image, where the brighter part indicates the higher the user's attention, that is, the area that the user is more interested in, the darker The part of means that the user's attention is lower. (4) It is the result of calcul...
Abstract
The invention provides an image thumbnail generation method and device and a terminal, and belongs to the field of communication. The method comprises the steps of conducting smoothing on an image to obtain the edge strength value of each pixel point inside the image, using preset rectangular frames for conducting sliding search on the image, calculating the information amount distribution values of the rectangular frames at the positions of sliding search according to the edge strength values of the pixel points inside the image, selecting the rectangular frame with the maximum information amount distribution value, and capturing the image content corresponding to the selected rectangular frame to obtain the thumbnail of the image. The device comprises a smoothing module, a search module and a capture module. According to the image thumbnail generation method and device and the terminal, the thumbnail can be generated on the basis of content information of the image, the accuracy of the thumbnail for expressing the content information of the original image is improved, and the thumbnail better conforms to the cognitive habits of people.
Application Domain
Image enhancementImage analysis +3
Technology Topic
Image basedThumbnail +2
Image
Examples
- Experimental program(8)
Example Embodiment
[0075] Example 1
[0076] See figure 1 This embodiment provides a method for generating image thumbnails, which includes the following steps.
[0077] In step 101, the image is filtered to obtain the edge intensity value of each pixel in the image.
[0078] In this embodiment, filtering the image to obtain the edge intensity value of each pixel in the image may include: using Laplacian edge filter operator, Sobel edge filter operator, Robert edge operator, Prewitt edge operator Or the LOG edge operator filters the image to obtain the edge intensity value of each pixel in the image.
[0079] In this embodiment, pixels with relatively close edge intensity values can be considered to have little difference in color; pixels with more edge intensity values can be considered to have greater color differences. Therefore, it can be considered that the edge intensity values are in It reflects the content information of the image to a certain extent.
[0080] In step 102, a preset rectangular frame is used for sliding search on the image, and the information distribution value of the rectangular frame is calculated according to the edge intensity value of the pixel in the rectangular frame at each position of the sliding search.
[0081] Wherein, the preset rectangular frame may be a rectangular frame of any size smaller than the image. For example, in one case, the short side of the rectangular frame is equal to the short side of the image, and the long side of the rectangular frame is smaller than the long side of the image. In another case, the short side of the rectangular frame is smaller than the short side of the image, and the long side of the rectangular frame is equal to the long side of the image. In another case, the short side of the rectangular frame is smaller than the short side of the image, and the long side of the rectangular frame is smaller than the long side of the image, etc. This embodiment does not specifically limit this.
[0082] The sliding search of the rectangular frame on the image can be a sliding search in any direction. This embodiment does not specifically limit this. For example, it can be a sliding search only in the horizontal direction, or only a sliding search in the vertical direction, or along 45° direction search and so on.
[0083] In step 103, a rectangular frame with the largest information distribution value is selected, and the image content corresponding to the selected rectangular frame is intercepted to obtain a thumbnail of the image.
[0084] In this embodiment, the size of the generated thumbnail is not limited, for example, it can be a 1600×1200 image and so on. Among them, the intercepted image may also be compressed first, and then the compressed image is used as a thumbnail, which is not specifically limited in this embodiment.
[0085] In this embodiment, calculating the information distribution value of the rectangular frame at each position of the sliding search according to the edge intensity value of the pixel point in the rectangular frame may include:
[0086] For the rectangular frame at each position of the sliding search, sum the edge intensity values of all the pixels in it to obtain the information distribution value of the rectangular frame.
[0087] In this embodiment, the above-mentioned preset rectangular frame is used for sliding search on the image, and for the rectangular frame at each position of the sliding search, the information distribution value of the rectangular frame is calculated according to the edge intensity value of the pixel point in it. , Can include:
[0088] Use the pre-established attention model based on the center point of the image and the coordinates of each pixel to calculate the attention value of the spatial position of each pixel in the image; use a preset rectangular frame to slide the search on the image, and search for the slide Use the information distribution model established in advance according to the edge intensity value and the attention value of the space position to calculate the information distribution value of each pixel in the rectangular box, and the information of each pixel in the rectangular box The sum of the quantity distribution values obtains the information quantity distribution value of the rectangular box.
[0089] In this embodiment, summing the information distribution value of each pixel in the rectangular frame to obtain the information distribution value of the rectangular frame may include:
[0090] Use the pre-selected kernel function to calculate the weight value corresponding to each pixel in the image; multiply the information distribution value of each pixel in the rectangular frame with the corresponding weight value and then sum to obtain the information volume of the rectangular frame Distribution value; among them, the kernel function takes a larger weight value for pixels that are closer to the center of the image.
[0091] In this embodiment, using the attention model established in advance according to the center point of the image and the coordinates of each pixel point to calculate the attention value of the spatial position of each pixel point in the image may include:
[0092] Use the following attention model to calculate the attention value of each pixel in the image:
[0093] P ( i , j ) = exp ( - ( i - X c ) 2 - ( j - Y C ) 2 2 * σ 2 ) ;
[0094] Among them, (i,j) represents any pixel in the image, P(i,j) represents the attention value of the spatial position of the pixel, (X c ,Y c ) Represents the center point of the image, and σ is a preset coefficient.
[0095] In this embodiment, calculating the information distribution value of each pixel in the rectangular frame by using the information distribution model established in advance based on the edge intensity value and the spatial location attention value may include:
[0096] Use the following information distribution model to calculate the information distribution value of each pixel in the rectangular box:
[0097] I(i,j)=E(i,j)*P(i,j);
[0098] Among them, (i,j) represents any pixel in the image, I(i,j) represents the information distribution value of the pixel, E(i,j) represents the edge intensity value of the pixel, P( i, j) represents the attention value of the spatial position of the pixel.
[0099] In this embodiment, the foregoing rectangular frame may be a square, and the side length is equal to the length of the short side of the image. Thus, the thumbnail obtained after the interception can contain as much content information as possible.
[0100] In order to improve computational efficiency, in the above method, the above image can also be compressed before filtering to obtain an image with a smaller resolution, and then subsequent steps such as filtering are performed. After the rectangular frame with the largest information distribution value is selected, Then convert the rectangular frame to the position corresponding to the original image for interception. Wherein, the filtering the image to obtain the edge intensity value of each pixel in the image may include: compressing the original image, and filtering the compressed image to obtain the edge intensity value of each pixel in the image;
[0101] Correspondingly, the intercepting the image content corresponding to the selected rectangular frame to obtain the thumbnail of the image includes: corresponding the selected rectangular frame to the rectangular frame in the original image, and comparing the original The image content in the rectangular frame in the image is intercepted to obtain the thumbnail of the original image.
[0102] For example, a 1600×1200 image is first compressed into a 400×400 image, and then a rectangular frame is selected on the 400×400 image. After the selection is completed, the area corresponding to the rectangular frame is converted to a 1600×1200 image. Corresponding area, and then intercept and compress to get the thumbnail. This method greatly improves the processing speed, saves time, and fully meets the real-time requirements.
[0103] In the above method provided by this embodiment, the edge intensity value of each pixel in the image is obtained by filtering the image, and a preset rectangular frame is used to slide the search on the image. Frame, calculate the information distribution value of the rectangular frame according to the edge intensity value of the pixel points in it, select the rectangular frame with the largest information distribution value, and intercept the image content corresponding to the selected rectangular frame to obtain the image The thumbnail realizes the generation of thumbnails based on the content information of the image, improves the accuracy of the thumbnails expressing the original image content information, and is more in line with people's cognitive habits.
Example Embodiment
[0104] Example 2
[0105] See figure 2 This embodiment provides a method for generating image thumbnails, which includes the following steps.
[0106] In step 201, the image is filtered to obtain the edge intensity value of each pixel in the image.
[0107] Among them, filtering the image can be implemented by using multiple filtering operators. For details, see the description in Embodiment 1, which will not be repeated here.
[0108] In step 202, a preset rectangular frame is used for sliding search on the image. For the rectangular frame at each position of the sliding search, the edge intensity values of all the pixels in the rectangular frame are summed to obtain the information distribution of the rectangular frame. value.
[0109] Wherein, the size of the rectangular frame can be set as required, as long as it is smaller than the size of the image. The sliding search of the rectangular frame on the image may be a sliding search in any direction. This embodiment does not specifically limit this, and may refer to the description in Embodiment 1, which will not be repeated here.
[0110] Specifically, the following formula can be used to calculate the rectangular frame at each position of the sliding search:
[0111] I=∑E(i,j);
[0112] Among them, (i, j) represents any pixel in the image, E(i, j) represents the edge intensity value of the pixel, and I represents the information distribution value of the rectangular frame.
[0113] Here, it can be considered that the information distribution value of each pixel in the rectangular frame is equal to the edge intensity value of the point. Therefore, the sum of the edge intensity values of each pixel in the rectangular frame is the sum of the edge intensity of each pixel in the rectangular frame. The information distribution value is summed to obtain the information distribution value of the rectangular frame.
[0114] In step 203, a rectangular frame with the largest information distribution value is selected, and the image content corresponding to the selected rectangular frame is intercepted to obtain a thumbnail of the image.
[0115] In the above method provided by this embodiment, the edge intensity value of each pixel in the image is obtained by filtering the image, and a preset rectangular frame is used to slide the search on the image. Frame, sum the edge intensity values of all pixels in it to obtain the information distribution value of the rectangular frame, select the rectangular frame with the largest information distribution value, and intercept the image content corresponding to the selected rectangular frame to obtain The thumbnail of the image, because the thumbnail is generated based on the edge intensity value, the thumbnail is generated based on the content information of the image, so that the thumbnail can include important and significant content in the image, and the accuracy of the thumbnail expressing the original image content information is improved Sex is more in line with people’s cognitive habits.
Example Embodiment
[0116] Example 3
[0117] See Figure 3a This embodiment provides a method for generating image thumbnails, which includes the following steps.
[0118] In step 301, the image is filtered to obtain the edge intensity value of each pixel in the image.
[0119] Among them, filtering the image can be implemented by using multiple filtering operators. For details, see the description in Embodiment 1, which will not be repeated here.
[0120] In addition, for the convenience of calculation, the edge intensity value can be normalized to obtain a value in the range of 0 to 255, and then perform the calculation.
[0121] In step 302, the attention model established in advance based on the center point of the image and the coordinates of each pixel is used to calculate the attention value of the spatial position of each pixel in the image.
[0122] Among them, this step may include the following steps:
[0123] Use the following attention model to calculate the attention value of each pixel in the image:
[0124] P ( i , j ) = exp ( - ( i - X c ) 2 - ( j - Y C ) 2 2 * σ 2 ) ;
[0125] Among them, (i,j) represents any pixel in the image, P(i,j) represents the attention value of the spatial position of the pixel, (X c ,Y c ) Represents the center point of the image, and σ is a preset coefficient.
[0126] In this embodiment, the value of the coefficient σ can be set in advance as required. For example, the minimum value of the length and width of the image can be selected, and then 1/4 of the minimum value can be used as the value of the coefficient. This is not specifically limited.
[0127] In step 303, the information distribution model established in advance based on the edge intensity value and the spatial location attention value is used to calculate the information distribution value of each pixel in the image.
[0128] Among them, this step may include the following steps:
[0129] Use the following information distribution model to calculate the information distribution value of each pixel in the image:
[0130] I(i,j)=E(i,j)*P(i,j);
[0131] Among them, (i,j) represents any pixel in the image, I(i,j) represents the information distribution value of the pixel, E(i,j) represents the edge intensity value of the pixel, P( i, j) represents the attention value of the spatial position of the pixel.
[0132] In step 304, a preset rectangular frame is used to slide the search on the image, and for the rectangular frame at each position of the sliding search, the information distribution value of each pixel in the rectangular frame is added to obtain the rectangular frame Information distribution value.
PUM


Description & Claims & Application Information
We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.