Image quality determination method and device, equipment and storage medium
By generating heat zone maps of images in cooking videos and calculating similarities, the problem of lack of image quality evaluation in the existing technology is solved, and accurate evaluation and screening of image quality in cooking videos are achieved.
Patent Information
- Application Number
- CN202411801649.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-01-21
AI Technical Summary
The prior art lacks evaluation of image quality in cooking videos, resulting in users facing poorer image quality problems when storing and browsing.
By acquiring the first image and subsequent images after cooking starts, a heat zone map of the first image and subsequent images is generated, and the similarity between the two is calculated to determine the image quality of the subsequent images.
It achieves accurate evaluation of image quality in cooking videos, helps users filter high-quality images, and saves storage space and browsing time.
Smart Images

Figure CN119339219A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, device, equipment and storage medium for determining image quality. Background Art
[0002] As people continue to pursue a better quality of life, they have begun to use smart home technology to continuously study cooking skills or share the cooking process. At present, a camera can be installed in the cooking equipment to shoot the cooking process of the ingredients during the cooking process to form a cooking video. After the cooking is finished, the user can view the cooking video or share the cooking video with other users.
[0003] In order to form a cooking video, a large number of images are captured by a camera during a cooking process. However, since steam is generated during the cooking process of some ingredients and the steam blocks the ingredients, the effects of most of the captured images are relatively poor. However, currently, only cooking videos are simply captured and provided to users without quality evaluation of the images in the cooking videos. After the cooking videos are provided to users, the poor quality images in the cooking videos have no reference significance for users and have no aesthetic appeal. Moreover, a large number of poor quality images not only occupy the user's storage space, but also require the user to spend a lot of time selecting available video clips in the cooking videos. Summary of the invention
[0004] The present application provides a method, apparatus, device and storage medium for determining image quality to solve the current problem of lack of quality evaluation of images in cooking videos.
[0005] In view of the above technical problems, the technical solution of this application is solved by the following embodiments:
[0006] An embodiment of the present application provides a method for determining image quality, including: acquiring a first image taken after the start of cooking and generating a heat map of the first image based on the first image; acquiring subsequent images taken during the cooking process and generating heat maps of subsequent images based on the subsequent images; determining the similarity between the heat map of the first image and the heat map of the subsequent images; and determining the image quality corresponding to the subsequent images based on the similarity between the heat map of the first image and the heat map of the subsequent images.
[0007] Wherein, generating a heat map of the first image according to the first image includes: identifying the type of food corresponding to the first image; querying the characteristic value corresponding to the type of food; extracting each first feature point matching the characteristic value in the first image; generating the heat map of the first image according to the pixel position of each first feature point in the first image; wherein the value of each element in the heat map of the first image is: the number of first feature points in the pixel area corresponding to the element in the first image.
[0008] Wherein, generating a subsequent image heat map according to the subsequent image includes: extracting each second feature point matching the feature value in the subsequent image; generating the subsequent image heat map according to the pixel position of each second feature point in the subsequent image; wherein the value of each element in the subsequent image heat map is: the number of second feature points in the pixel area corresponding to the element in the subsequent image; in the subsequent image heat map and the first image heat map, elements at the same position correspond to pixel areas at the same position.
[0009] Among them, generating the heat map of the first image according to the pixel position of each first feature point in the first image includes: performing downsampling processing on the first image according to a preset downsampling strategy; generating the heat map of the first image according to the pixel positions respectively corresponding to each first feature point included in the first image after the downsampling processing; generating the heat map of the subsequent image according to the pixel position of each second feature point in the subsequent image includes: performing the downsampling processing on the subsequent image according to the downsampling strategy; generating the heat map of the subsequent image according to the pixel positions respectively corresponding to each second feature point included in the subsequent image after the downsampling processing.
[0010] Wherein, determining the similarity between the first image heat map and the subsequent image heat map includes: determining the ratio between the number of second feature points in the subsequent image heat map and the number of first feature points in the first image heat map, and determining the ratio as the similarity between the first image heat map and the subsequent image heat map.
[0011] Among them, determining the image quality corresponding to the subsequent image based on the similarity between the heat map of the first image and the heat map of the subsequent image includes: presetting a plurality of ratio intervals and setting an image quality corresponding to each of the ratio intervals; the image quality is positively correlated with the end value of the ratio interval; and determining the image quality corresponding to the ratio interval where the ratio is located as the image quality corresponding to the subsequent image.
[0012] Wherein, after determining the image quality corresponding to the subsequent images, it also includes: according to the image quality corresponding to the first image and all the subsequent images after the first image, respectively adding image quality labels to the first image and all the subsequent images after the first image to form cooking video data; or, among the first image and all the subsequent images after the first image, obtaining each image that meets the preset grade condition; wherein the grade condition includes: the image quality corresponding to the image to generate the cooking video data; generating the cooking video data according to the shooting time corresponding to each image that meets the preset grade condition.
[0013] An embodiment of the present application also provides an image quality determination device, including: a first acquisition and generation module, used to acquire the first image taken after the start of cooking and generate a first image heat map based on the first image; a second acquisition and generation module, used to acquire subsequent images taken during the cooking process and generate subsequent image heat maps based on the subsequent images; a first determination module, used to determine the similarity between the first image heat map and the subsequent image heat map; a second determination module, used to determine the image quality corresponding to the subsequent image based on the similarity between the first image heat map and the subsequent image heat map.
[0014] An embodiment of the present application also provides an image quality determination device, comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus, wherein the processor is configured to: execute an image quality determination program stored in the memory to implement any of the above-described image quality determination methods.
[0015] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed to implement any of the above-mentioned methods for determining image quality.
[0016] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art: the method provided by the embodiment of the present application can obtain the first image taken after the start of cooking and generate a heat map of the first image based on the first image; obtain subsequent images taken during the cooking process and generate heat maps of subsequent images based on the subsequent images; determine the similarity between the heat map of the first image and the heat map of the subsequent images; and determine the image quality corresponding to the subsequent images based on the similarity between the heat map of the first image and the heat map of the subsequent images. In the process of shooting cooking images, the embodiment of the present application generates a heat map corresponding to the cooking image. The heat map can reflect the quantity distribution of the characteristic points of the food ingredients, and the image quality of the first image is the highest. Therefore, by determining the similarity between the heat map of the first image and the heat map of the subsequent images, the image quality corresponding to the subsequent images can be determined more conveniently and accurately, providing an image quality reference for the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0020] Figure 1 is a flowchart of a method for determining image quality according to an embodiment of the present application;
[0021] Figure 2 A schematic diagram of the quantity distribution trend of feature points during the cooking process of food according to an embodiment of the present application;
[0022] Figure 3 A flow chart of steps for generating a first image heat map according to an embodiment of the present application;
[0023] Figure 4 A flowchart of specific steps for generating a first image heat map according to an embodiment of the present application;
[0024] Figure 5 is a structural diagram of an apparatus for determining image quality according to an embodiment of the present application;
[0025] Figure 6 It is a structural diagram of a device for determining image quality according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0027] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0028] The embodiment of the present application provides a method for determining image quality. The execution subject of the embodiment of the present application is a server or a cooking device. The types of cooking devices include but are not limited to: steam ovens, microwave ovens and smart smoke stoves. Figure 1 , which is a flow chart of a method for determining image quality according to an embodiment of the present application.
[0029] Step S110, obtaining the first image taken after the start of cooking and generating a first image heat map according to the first image.
[0030] The first image refers to the first cooking image captured by the camera.
[0031] The first image heat map refers to the quantity distribution matrix of the first feature points in the first image. The first feature points refer to points used to reflect the characteristics of the food.
[0032] In the embodiment of the present application, a camera installed in a cooking device is called to make the camera shoot the process of the cooking device cooking the food. After the camera shoots the cooking process of the food completely, the first cooking image shot by the camera is obtained in the obtained video data; or, in the process of the camera shooting the cooking of the food, each cooking image output by the camera is sequentially obtained, and then the first cooking image shot by the camera can be obtained.
[0033] Step S120, acquiring subsequent images taken during the cooking process and generating a subsequent image heat map according to the subsequent images.
[0034] The subsequent image refers to each cooking image from the second cooking image to the last cooking image captured by the photographing device.
[0035] The subsequent image heat map refers to the number distribution matrix of the second feature points in the subsequent image. The second feature points are the same as the first feature points, and are both points used to reflect the characteristics of the food.
[0036] Step S130, determining the similarity between the first image heat map and the subsequent image heat map.
[0037] Similarity refers to the degree of similarity between the heat map of the first image and the heat map of the subsequent images, that is, the degree of similarity between the image quality of the first image and the image quality of the subsequent images.
[0038] The higher the image quality, the more feature points of the ingredients in the image, and the denser the distribution of the feature points of the ingredients. The lower the image quality, the fewer feature points of the ingredients in the image, and the sparser the distribution of the feature points of the ingredients. Therefore, the embodiment of the present application reflects the image quality through a heat map of the cooking image.
[0039] Specifically, if Figure 2 The figure is a schematic diagram of the distribution trend of the number of feature points in the cooking process of ingredients according to an embodiment of the present application. In the process of cooking ingredients, since the first image taken by the shooting device is not affected by the steam generated during the cooking process, the whole picture of the ingredients can be clearly captured. Therefore, the number of feature points of the ingredients in the first image is the largest, and the image quality of the first image is the highest. As the cooking time increases, subsequent images may be affected by the diffusion of steam, resulting in a gradual decrease in the number of feature points of the ingredients in subsequent images. When the steam evaporates the most, the number of feature points of the ingredients in subsequent images is the smallest due to the obstruction of the ingredients. When the steam begins to gradually decrease, the number of feature points of the ingredients in subsequent images gradually increases. After the steam disappears, the number of feature points of the ingredients in subsequent images is close to that of the first image. The change in the number of feature points of the ingredients in subsequent images causes fluctuations in the image quality of subsequent images. Figure 2 The dotted line in can filter out cooking images with image quality above the excellent line. Similarly, cooking images with the number of feature points between the excellent line and the good line are cooking images with good image quality.
[0040] Furthermore, the heat map of the first image is used to reflect the quantity distribution of the first characteristic points of the food. The heat map of the subsequent image is used to reflect the quantity distribution of the second characteristic points of the food. Therefore, the closer the heat map of the subsequent image is to the heat map of the first image, the closer the image quality of the subsequent image is to the first image; the closer the heat map of the subsequent image is to the heat map of the first image, the less close the image quality of the subsequent image is to the first image.
[0041] Step S140: determining the image quality corresponding to the subsequent image according to the similarity between the heat map of the first image and the heat map of the subsequent image.
[0042] Image quality refers to the clarity of the cooking image. The higher the image quality of the cooking image, the lower the degree of interference behind the food image in the cooking image, and the lower the image quality of the cooking image, the higher the degree of interference to the food image in the cooking image. The interference includes but is not limited to: the occlusion of food by steam generated by cooking, image exposure caused by reflection, and image deformation caused by high temperature air waves.
[0043] The image quality of the first image can be the highest image quality, that is, the cooking image with the greatest clarity; the greater the similarity between the heat map of the first image and the heat map of subsequent images, the closer the image quality of the subsequent images is to the highest image quality; the smaller the similarity between the heat map of the first image and the heat map of the subsequent images, the further the image quality of the subsequent images is from the highest image quality.
[0044] In an embodiment of the present application, the first image taken after the start of cooking is obtained and a heat map of the first image is generated based on the first image; subsequent images taken during the cooking process are obtained and heat maps of subsequent images are generated based on the subsequent images; the similarity between the heat map of the first image and the heat map of the subsequent images is determined; and the image quality corresponding to the subsequent images is determined based on the similarity between the heat map of the first image and the heat map of the subsequent images. In the process of shooting cooking images, an embodiment of the present application generates a heat map corresponding to the cooking images. The heat map can reflect the quantitative distribution of feature points of the ingredients, and the image quality of the first image is the highest. Therefore, by determining the similarity between the heat map of the first image and the heat map of the subsequent images, the image quality corresponding to the subsequent images can be determined more conveniently and accurately, providing an image quality reference for the user.
[0045] In order to make the embodiment of the present application clearer, the method for determining the image quality of the embodiment of the present application will be further described below.
[0046] In an embodiment of the present application, a shooting device provided in a cooking device is called to shoot the cooking process of the ingredients, and a cooking image output by a shooting head is obtained. The first cooking image obtained is used as the first image, and each cooking image obtained subsequently is used as a subsequent image.
[0047] Types of cooking equipment include but are not limited to: steam ovens, microwave ovens and smart smoke stoves.
[0048] The types of photographing devices include, but are not limited to, cameras. The photographing device may be set in the housing of the cooking device or on the body of the cooking device. For example, a camera is set in the housing of a steaming oven to photograph the steaming and baking process of the food in the housing. Another example is to set a camera on the body of the range hood of a smart range hood to photograph the cooking process of the food on the stove.
[0049] The cooking image includes ingredients; or the cooking image includes ingredients and a carrier for holding the ingredients. The carrier for holding the ingredients is, for example, a baking tray, a tin foil tray, etc. The carrier for holding the ingredients is photographed in the cooking image because the carrier can reflect the type of the ingredients to a certain extent.
[0050] In the embodiment of the present application, since different cooking devices have different cooking principles, for cooking devices whose carrier for holding food is movable during cooking, when shooting cooking images, the angles of the carrier for holding food corresponding to each cooking image are the same. For example, after the microwave oven is started, the holding plate for holding food rotates continuously, so when shooting cooking images, a cooking image can be shot each time the holding plate rotates to a preset angle, so that the angles corresponding to each cooking image are the same.
[0051] In the embodiment of the present application, in order to make the determination result of the image quality more accurate, the first image acquired and the subsequent images acquired can be sharpened. After the cooking image is sharpened, the feature points in the cooking image are clearer.
[0052] In the embodiment of the present application, after the first image is acquired, a first image heat map is generated according to the first image. Figure 3 , is a flow chart of the steps for generating a first image heat map according to an embodiment of the present application.
[0053] Step S310, identifying the type of food corresponding to the first image.
[0054] The food type corresponding to the food appearing in the first image may be identified by using a preset image recognition algorithm or a pre-trained food type recognition model.
[0055] Step S320, querying the characteristic value corresponding to the food type.
[0056] The types of ingredients include, but are not limited to, vegetables, fruits, and meat. Ingredients of the same type have the same characteristic values.
[0057] The feature value refers to the feature data corresponding to the food type. The feature value includes but is not limited to: grayscale feature, gradient feature and texture feature.
[0058] Specifically, there is a correlation between feature values and feature points. Feature values are used to describe the feature data of ingredients in cooking images, while feature points are the specific manifestations of feature data in cooking images. Furthermore, since there may be a situation where multiple ingredients correspond to the same feature value, for example, beef and pork are very similar in terms of grayscale features, gradient features, and texture features, the embodiment of the present application identifies the type of ingredients appearing in the cooking image by querying the feature value corresponding to the type of ingredient.
[0059] Furthermore, multiple food types can be pre-set and characteristic values can be set for each food type, and the characteristic values corresponding to the multiple food types can be stored in a preset database; after identifying the food type corresponding to the first image, the characteristic value corresponding to the food type corresponding to the first image is queried in the database.
[0060] Step S330: extracting first feature points matching the feature values in the first image.
[0061] A preset feature recognition algorithm can be used to identify a first feature point that matches the feature value in the first image. The embodiment of the present application is used to distinguish the feature points identified in the first image from the feature points identified in the subsequent images, and to determine the feature points identified in the first image as the first feature point and the feature points identified in the subsequent images as the second feature point.
[0062] Types of feature extraction algorithms include, but are not limited to, Speeded Up Robust Features (SURF) algorithm.
[0063] In the embodiment of the present application, in the first image, each first feature point matching the feature value is extracted, and in the first image, only the extracted first feature points are included to form a first feature map corresponding to the first image.
[0064] Step S340, generating a heat map of the first image according to the pixel position of each of the first feature points in the first image; wherein the value of each element in the heat map of the first image is: the number of first feature points in the pixel area corresponding to the element in the first image.
[0065] The first image heat map is a matrix used to record the number of first feature points in the first image.
[0066] Specifically, the first image may be downsampled according to a preset downsampling strategy; and a heat map of the first image may be generated according to pixel positions corresponding to each of the first feature points included in the first image after the downsampling process.
[0067] The downsampling strategy is used to reduce the size of the first image.
[0068] The types of downsampling strategies include, but are not limited to, maximum pooling downsampling and alternate row and column downsampling. The size of the first image after the downsampling process is a preset size. The preset size may be an empirical value or a value obtained through experiments.
[0069] like Figure 4 , which is a flowchart of specific steps for generating the first image heat map according to an embodiment of the present application.
[0070] Step S410: downsampling the first image according to a preset downsampling strategy to obtain a first downsampling image.
[0071] According to the downsampling strategy, downsampling processing may be performed on the first feature map corresponding to the first image to obtain a first downsampled image.
[0072] Step S420: Divide the first downsampled image into a plurality of pixel regions having a plurality of rows and columns and determine the number of first feature points in each of the pixel regions.
[0073] The first down-sampled image may be divided into pixel regions of N rows and M columns, and the size of each pixel region may be k×j pixels; and the number of first feature points contained in each pixel region is determined.
[0074] Step S430, initializing a first element matrix; wherein the number of rows of the first element matrix is the same as the number of rows of the pixel region of the first downsampled image, and the number of columns of the first element matrix is the same as the number of columns of the pixel region of the first downsampled image.
[0075] The first element matrix includes N×M element positions, each element position corresponds to a pixel region at a corresponding position in the first downsampled image. After initialization, the initial value of each element in the first element matrix may be a preset value. For example, the preset value is 0.
[0076] Step S440, writing the number of first feature points of each element area in the first downsampled image into the corresponding position in the first element matrix as the value of the element corresponding to the position in the first element matrix, to form a first image heat map.
[0077] The number of first feature points included in the corresponding element region in the first downsampled image may be written into each element position of the first element matrix, and finally a first image heat map is formed.
[0078] In an embodiment of the present application, after a subsequent image is acquired, a subsequent image heat map may be generated based on the subsequent image.
[0079] Specifically, since the characteristic value corresponding to the food type has been queried after the food type is identified in the first image, the second feature points matching the characteristic value can be extracted in the subsequent image; the subsequent image heat map is generated according to the pixel position of each second feature point in the subsequent image; wherein the value of each element in the subsequent image heat map is: the number of second feature points in the pixel area corresponding to the element in the subsequent image; in the subsequent image heat map and the first image heat map, elements at the same position correspond to pixel areas at the same position.
[0080] The subsequent image heat map is a matrix for recording the number of second feature points in the subsequent image, wherein the size of the subsequent image heat map is the same as the size of the first image heat map, and the elements at the same position correspond to the pixel areas at the same position in the cooking image.
[0081] Furthermore, according to the downsampling strategy used when generating the first image heat map, the same downsampling process is performed on the subsequent image to obtain a second downsampled image; the second downsampled image is divided into multiple pixel areas with multiple rows and columns and the number of second feature points in each of the element areas is determined; the second element matrix is initialized; wherein the number of rows of the second element matrix is the same as the number of rows of the pixel areas of the second downsampled image, and the number of columns of the second element matrix is the same as the number of columns of the pixel areas of the second downsampled image; the number of second feature points of each of the element areas in the second downsampled image is written into the corresponding position in the second element matrix as the value of the element corresponding to the position of the second element matrix, to form a subsequent image heat map.
[0082] In the embodiment of the present application, since a large number of feature points will be repeated on the surface of the food, that is, many similar feature points can be extracted from the cooking image, but the number of feature points is very sensitive to the shooting environment, and will decrease rapidly after being disturbed by water vapor, high temperature waves and other environmental factors. Therefore, the image quality of the cooking image can be determined by judging the change in the number of these feature points. Therefore, the embodiment of the present application uses the number of feature points to determine the image of the cooking image.
[0083] In the embodiment of the present application, after obtaining the heat map of the first image and the heat map of the subsequent images, the similarity between the heat map of the first image and the heat map of the subsequent images can be determined.
[0084] Specifically, a preset similarity algorithm may be used to calculate the similarity between the first image heat map and the subsequent image heat map.
[0085] The types of similarity algorithms include but are not limited to: matching degree logarithmic algorithm. Further, the ratio between the number of second feature points in the subsequent image heat map and the number of first feature points in the first image heat map can be determined, and the ratio can be determined as the similarity between the first image heat map and the subsequent image heat map.
[0086] The closer the ratio is to 1, the closer the heat map of the first image and the heat map of the subsequent image are to each other, and the image quality of the subsequent image is higher. The closer the ratio is to 0, the less similar the heat map of the first image and the heat map of the subsequent image are to each other, and the image quality of the subsequent image is lower.
[0087] In the embodiment of the present application, after determining the similarity between the heat map of the first image and the heat map of the subsequent image, the image quality corresponding to the subsequent image can be determined based on the similarity.
[0088] Furthermore, the types of image quality may include high-quality images and low-quality images. An image quality threshold may be preset, and when the similarity is greater than the image quality threshold, the image quality corresponding to the subsequent image is determined to be a high-quality image; when the similarity is less than or equal to the image quality threshold, the image quality corresponding to the subsequent image is determined to be a low-quality image.
[0089] Furthermore, the level of image quality may include multiple levels of image quality. Multiple ratio intervals may be pre-set and an image quality (level) may be set for each ratio interval; the image quality is positively correlated with the end value of the ratio interval; the image quality corresponding to the ratio interval where the ratio is located is determined as the image quality corresponding to the subsequent image. The higher the image quality, the larger the end value of the corresponding ratio interval; the lower the image quality, the smaller the end value of the corresponding ratio interval.
[0090] For example: image quality is pre-divided into clear, general and poor, each image quality corresponds to a ratio interval, and after determining the ratio between the number of second feature points in the subsequent image heat map and the number of first feature points in the first image heat map, the image quality corresponding to the subsequent image is determined according to the image quality corresponding to the ratio interval in which the ratio lies.
[0091] In an embodiment of the present application, after determining the image quality corresponding to the subsequent images, a cooking image with an image quality label can be generated based on the image qualities corresponding to the first image and all subsequent images of the first image, and cooking video data that can reflect the image quality of each (each frame) cooking image can be generated.
[0092] Furthermore, according to the image qualities corresponding to the first image and all the subsequent images after the first image, image quality labels can be added to the first image and all the subsequent images after the first image to form cooking video data. In this way, in the cooking video data, each frame of the cooking image has an image quality label. The cooking video data can be stored in the cloud for viewing and / or downloading by the user terminal; or, the cooking video data can be sent to the user terminal so that the user can directly view the cooking video data on the user terminal. When playing the cooking video data, according to the image quality label and the playback time corresponding to each frame of the cooking image, the color corresponding to the image quality label can be marked at the corresponding playback time of the progress bar. In this way, when playing the cooking video data, by viewing the color displayed on the progress bar, the image quality label corresponding to each playback time can be seen, so that the required time period can be selected for viewing.
[0093] Furthermore, each image that meets the preset grade condition can be obtained from the first image and all the subsequent images after the first image; wherein the grade condition includes: the image quality corresponding to the image to be generated for the cooking video data; and the cooking video data is generated according to the shooting time corresponding to each image that meets the preset grade condition. The grade condition can be received from the user terminal. For example: if the executor of the embodiment of the present application is a server, then a plurality of optional grade conditions can be provided on the user terminal, and the user selects the required grade condition, such as the highest image quality. The user terminal sends the grade condition selected by the user to the server, and the server obtains each cooking image that meets the grade condition based on the received grade condition to form cooking video data. In this way, the cooking video data is video data that filters out images that do not meet the grade condition.
[0094] The present application also provides a device for determining image quality. Figure 5 , which is a structural diagram of an apparatus for determining image quality according to an embodiment of the present application.
[0095] The image quality determination device comprises:
[0096] The first acquisition and generation module 510 is used to acquire the first image taken after the cooking starts and generate the first image heat map according to the first image.
[0097] The second acquisition and generation module 520 is used to acquire subsequent images taken during the cooking process and generate a subsequent image heat map according to the subsequent images.
[0098] The first determination module 530 is used to determine the similarity between the first image heat map and the subsequent image heat map.
[0099] The second determination module 540 is used to determine the image quality corresponding to the subsequent image according to the similarity between the heat map of the first image and the heat map of the subsequent image.
[0100] The functions of the device described in the embodiment of the present application have been described in the above method embodiment. Therefore, for any details not provided in the description of this embodiment, please refer to the relevant descriptions in the above embodiment and will not be repeated here.
[0101] The present application also provides a device for determining image quality. Figure 6 , which is a structural diagram of a device for determining image quality according to an embodiment of the present application.
[0102] The image quality determination device includes: a processor 610 , a communication interface 620 , a memory 630 and a communication bus 640 . The processor 610 , the communication interface 620 , and the memory 630 communicate with each other via the communication bus 640 .
[0103] The memory 630 is used to store computer programs.
[0104] In one embodiment of the present application, the processor 610, when executing the program stored in the memory 630, implements the method for determining the image quality provided by any of the aforementioned method embodiments, including: obtaining the first image taken after the start of cooking and generating a first image heat map based on the first image; obtaining subsequent images taken during the cooking process and generating subsequent image heat maps based on the subsequent images; determining the similarity between the first image heat map and the subsequent image heat map; and determining the image quality corresponding to the subsequent image based on the similarity between the first image heat map and the subsequent image heat map.
[0105] Wherein, generating a heat map of the first image according to the first image includes: identifying the type of food corresponding to the first image; querying the characteristic value corresponding to the type of food; extracting each first feature point matching the characteristic value in the first image; generating the heat map of the first image according to the pixel position of each first feature point in the first image; wherein the value of each element in the heat map of the first image is: the number of first feature points in the pixel area corresponding to the element in the first image.
[0106] Wherein, generating a subsequent image heat map according to the subsequent image includes: extracting each second feature point matching the feature value in the subsequent image; generating the subsequent image heat map according to the pixel position of each second feature point in the subsequent image; wherein the value of each element in the subsequent image heat map is: the number of second feature points in the pixel area corresponding to the element in the subsequent image; in the subsequent image heat map and the first image heat map, elements at the same position correspond to pixel areas at the same position.
[0107] Among them, generating the heat map of the first image according to the pixel position of each first feature point in the first image includes: performing downsampling processing on the first image according to a preset downsampling strategy; generating the heat map of the first image according to the pixel positions respectively corresponding to each first feature point included in the first image after the downsampling processing; generating the heat map of the subsequent image according to the pixel position of each second feature point in the subsequent image includes: performing the downsampling processing on the subsequent image according to the downsampling strategy; generating the heat map of the subsequent image according to the pixel positions respectively corresponding to each second feature point included in the subsequent image after the downsampling processing.
[0108] Wherein, determining the similarity between the first image heat map and the subsequent image heat map includes: determining the ratio between the number of second feature points in the subsequent image heat map and the number of first feature points in the first image heat map, and determining the ratio as the similarity between the first image heat map and the subsequent image heat map.
[0109] Among them, determining the image quality corresponding to the subsequent image based on the similarity between the heat map of the first image and the heat map of the subsequent image includes: presetting a plurality of ratio intervals and setting an image quality corresponding to each of the ratio intervals; the image quality is positively correlated with the end value of the ratio interval; and determining the image quality corresponding to the ratio interval where the ratio is located as the image quality corresponding to the subsequent image.
[0110] Wherein, after determining the image quality corresponding to the subsequent images, it also includes: according to the image quality corresponding to the first image and all the subsequent images after the first image, respectively adding image quality labels to the first image and all the subsequent images after the first image to form cooking video data; or, among the first image and all the subsequent images after the first image, obtaining each image that meets the preset grade condition; wherein the grade condition includes: the image quality corresponding to the image to generate the cooking video data; generating the cooking video data according to the shooting time corresponding to each image that meets the preset grade condition.
[0111] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for determining image quality provided in any of the above method embodiments are implemented. Since the method for determining image quality has been described in detail above, for the details not fully described in the description of this embodiment, please refer to the relevant description in the above embodiments, and no further description will be given here.
[0112] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0113] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0114] It should be understood that the terms used in the text are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used in the text may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described in the text are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0115] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A method for determining image quality, characterized in that: include: Acquire a first image taken after the start of cooking and generate a first image heat map according to the first image; Acquire subsequent images captured during the cooking process and generate a subsequent image heat map according to the subsequent images; Determining a similarity between the first image heat map and the subsequent image heat map; The image quality corresponding to the subsequent image is determined according to the similarity between the first image heat map and the subsequent image heat map.
2. The method according to claim 1, characterized in that: Generating a first image heat map according to the first image includes: Identify the type of food corresponding to the first image; Querying the characteristic value corresponding to the food type; In the first image, extracting each first feature point matching the feature value; The heat map of the first image is generated according to the pixel position of each of the first feature points in the first image; wherein the value of each element in the heat map of the first image is: the number of first feature points in the pixel area corresponding to the element in the first image.
3. The method according to claim 2, characterized in that The generating a subsequent image heat map according to the subsequent image comprises: In the subsequent image, extracting each second feature point matching the feature value; The subsequent image heat map is generated according to the pixel position of each second feature point in the subsequent image; wherein the value of each element in the subsequent image heat map is: the number of second feature points in the pixel area corresponding to the element in the subsequent image; in the subsequent image heat map and the first image heat map, elements at the same position correspond to pixel areas at the same position.
4. The method according to claim 3, characterized in that The step of generating the heat map of the first image according to the pixel position of each of the first feature points in the first image comprises: Performing downsampling processing on the first image according to a preset downsampling strategy; generating a heat map of the first image according to pixel positions corresponding to the first feature points in the first image after downsampling processing; The step of generating the subsequent image heat map according to the pixel position of each of the second feature points in the subsequent image comprises: According to the downsampling strategy, performing the downsampling process on the subsequent image; The subsequent image heat map is generated according to the pixel positions respectively corresponding to the second feature points included in the subsequent image after the downsampling process.
5. The method according to claim 3 or 4, characterized in that: The determining the similarity between the first image heat map and the subsequent image heat map comprises: A ratio between the number of second feature points in the subsequent image heat map and the number of first feature points in the first image heat map is determined, and the ratio is determined as the similarity between the first image heat map and the subsequent image heat map.
6. The method according to claim 5, characterized in that The determining, according to the similarity between the first image heat map and the subsequent image heat map, the image quality corresponding to the subsequent image includes: Pre-setting a plurality of ratio intervals and setting an image quality for each ratio interval; the image quality is positively correlated with the end value of the ratio interval; The image quality corresponding to the ratio interval in which the ratio is located is determined as the image quality corresponding to the subsequent image.
7. The method according to claim 1, characterized in that After determining the image quality corresponding to the subsequent image, the method further includes: According to the image qualities respectively corresponding to the first image and all the subsequent images after the first image, image quality labels are added to the first image and all the subsequent images after the first image to form cooking video data; or, Among the first image and all the subsequent images after the first image, each image that meets the preset grade conditions is obtained; wherein the grade conditions include: the image quality corresponding to the image for generating the cooking video data; and the cooking video data is generated according to the shooting time corresponding to each image that meets the preset grade conditions.
8. A device for determining image quality, characterized in that: include: A first acquisition and generation module, configured to acquire a first image taken after the start of cooking and generate a first image heat map according to the first image; A second acquisition and generation module, used for acquiring subsequent images taken during the cooking process and generating a subsequent image heat map according to the subsequent images; A first determination module, used to determine the similarity between the first image heat map and the subsequent image heat map; The second determination module is used to determine the image quality corresponding to the subsequent image according to the similarity between the heat map of the first image and the heat map of the subsequent image.
9. A device for determining image quality, characterized in that include: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor coupled to the at least one bus; At least one memory connected to the at least one bus, wherein the processor is configured to: execute the image quality determination program stored in the memory to implement the image quality determination method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed to implement the method for determining image quality according to any one of claims 1 to 7.