Image detection method and device, computer readable storage medium and computer equipment

By acquiring the image to be detected after image feature adjustment and its parameters, determining the reference image and extracting color feature data, the problem of low efficiency of manual judgment in the existing technology is solved, and the automated verification and efficiency improvement of image feature adjustment effect are realized.

CN115700746BActive Publication Date: 2025-11-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110861396.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-29
Publication Date
2025-11-25
Estimated Expiration
2041-07-29

AI Technical Summary

Technical Problem

In existing technologies, the editing effect of video editing can only be judged subjectively by humans, which is inefficient and cannot accurately determine whether the image feature adjustment has achieved the preset effect.

Method used

By acquiring the image to be detected after image feature adjustment and its corresponding target image feature adjustment parameters, a reference image is determined, and the color feature data of the image to be detected and the reference image are extracted. The image feature adjustment effect is automatically verified based on the matching results.

Benefits of technology

It enables automated verification of image feature adjustment effects, improves the efficiency of image detection, and ensures the accuracy and efficiency of image detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115700746B_ABST
    Figure CN115700746B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an image detection method and device, a computer readable storage medium and a computer device. The method comprises: obtaining an image feature adjusted to-be-detected image and target image feature adjustment parameters corresponding to the to-be-detected image; determining a reference image according to the to-be-detected image and the target image feature adjustment parameters; extracting color feature data of the to-be-detected image to obtain first color feature data; extracting color feature data of the reference image to obtain second color feature data; and determining a detection result of the to-be-detected image according to a matching result of the first color feature data and the second color feature data. In this way, the color feature data of the image feature adjusted to-be-detected image and the color feature data of the reference image are automatically matched, and the detection result of the to-be-detected image is determined according to the matching result. The effect of image feature adjustment can be automatically verified, and the efficiency of image detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and in particular to an image detection method and device, a computer readable storage medium and a computer device. BACKGROUND

[0002] In recent years, with the popularity of intelligent mobile terminals and the reduction of network traffic costs, short and fast mass communication content has gradually gained the favor of major platforms, fans and capital. Among them, short videos have rapidly spread among Internet users of all ages due to their simple production process, low production threshold, strong participation and high communication value.

[0003] Short video applications have also broken down the professional barriers of video production, allowing ordinary users to edit video materials. However, the editing effect of video editing can only be judged subjectively by artificial means at present, which is inefficient. SUMMARY

[0004] The embodiments of the present application provide an image detection method, device, computer readable storage medium and computer device, which can quickly determine whether image adjustment achieves a preset effect according to color feature data of an image, thereby improving the efficiency of image detection.

[0005] The first aspect of the present application provides an image detection method, which comprises:

[0006] obtaining an image feature adjusted to-be-detected image and a target image feature adjustment parameter corresponding to the to-be-detected image;

[0007] determining a reference image according to the to-be-detected image and the target image feature adjustment parameter, the reference image being an image determined by the target image feature adjustment parameter in a reference image set generated according to each image feature adjustment parameter;

[0008] extracting color feature data of the to-be-detected image to obtain first color feature data;

[0009] extracting color feature data of the reference image to obtain second color feature data;

[0010] determining a detection result of the to-be-detected image according to a matching result of the first color feature data and the second color feature data.

[0011] Correspondingly, the second aspect of the present application provides an image detection device, which comprises:

[0012] an acquisition unit configured to acquire an image feature adjusted to-be-detected image and a target image feature adjustment parameter corresponding to the to-be-detected image;

[0013] The first determining unit is configured to determine a reference image according to the to-be-detected image and the target image feature adjustment parameter, the reference image being an image determined by the target image feature adjustment parameter in a set of reference images generated according to each image feature adjustment parameter;

[0014] The first extracting unit is configured to extract color feature data of the to-be-detected image to obtain first color feature data.

[0015] The second extracting unit is configured to extract color feature data of the reference image to obtain second color feature data.

[0016] The second determining unit is configured to determine a detection result of the to-be-detected image according to a matching result of the first color feature data and the second color feature data.

[0017] In some embodiments, the first extracting unit comprises:

[0018] The first dividing subunit is configured to divide the to-be-detected image into a plurality of pixels.

[0019] The first extracting subunit is configured to extract a value of an RGB channel of each pixel and determine first color feature data according to the value of the RGB channel.

[0020] In some embodiments, the extracting subunit comprises:

[0021] The calculating module is configured to calculate a first mean value of R channel values, a second mean value of G channel values, and a third mean value of B channel values.

[0022] The first determining module is configured to determine first color feature data according to the first mean value, the second mean value, and the third mean value.

[0023] In some embodiments, the first determining module comprises:

[0024] The calculating sub-module is configured to calculate a first variance of R channel values, a second variance of G channel values, and a third variance of B channel values.

[0025] The determining sub-module is configured to determine first color feature data according to the first mean value, the second mean value, the third mean value, the first variance, the second variance, and the third variance.

[0026] In some embodiments, the first determining unit comprises:

[0027] a sending subunit, configured to send the to-be-detected image to a server to enable the server to generate a reference image set corresponding to each image feature adjustment parameter according to the to-be-detected image;

[0028] a receiving subunit, configured to receive the reference image set returned by the server;

[0029] a first determining subunit, configured to determine a reference image from the reference image set according to the target image feature adjustment parameter.

[0030] In some embodiments, the obtaining unit comprises:

[0031] a first obtaining subunit, configured to obtain a to-be-detected video after video feature adjustment and a target image feature adjustment parameter corresponding to the to-be-detected video;

[0032] a second dividing subunit, configured to divide the to-be-detected video into multiple frames of images;

[0033] a second obtaining subunit, configured to obtain a texture complexity of each frame of image in the multiple frames of images, and sort the multiple frames of images based on the texture complexity;

[0034] a second determining subunit, configured to determine an image with the highest texture complexity in the multiple frames of images as a to-be-detected image.

[0035] In some embodiments, the second obtaining subunit comprises:

[0036] a dividing module, configured to divide each frame of image in the multiple frames of images into multiple pixels;

[0037] an obtaining module, configured to obtain a gray value of each pixel, and generate a gray histogram corresponding to each frame of image based on the gray value;

[0038] a second determining module, configured to determine the texture complexity of each frame of image according to the gray histogram corresponding to each frame of image.

[0039] In some embodiments, the first extracting unit comprises:

[0040] a third dividing subunit, configured to divide the to-be-detected image into multiple pixels;

[0041] a second extracting subunit, configured to extract a value of an HSV channel of each pixel, and determine first color feature data according to the value of the HSV channel.

[0042] The third aspect of the present application further provides a computer readable storage medium, which stores a plurality of instructions, and the instructions are adapted to be loaded by a processor to execute the steps of the image detection method provided in the first aspect of the present application.

[0043] The fourth aspect of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the image detection method provided by the first aspect of the present application when executing the computer program.

[0044] The fifth aspect of the present application provides a computer program product or a computer program, comprising computer instructions stored in a storage medium. A processor of a computer device reads the computer instructions from the storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of the image detection method provided by the first aspect.

[0045] The image detection method provided by the embodiments of the present application comprises the following steps: obtaining an image feature adjusted to-be-detected image and a target image feature adjustment parameter corresponding to the to-be-detected image; determining a reference image according to the to-be-detected image and the target image feature adjustment parameter, wherein the reference image is an image determined by the target image feature adjustment parameter in a reference image set generated according to each image feature adjustment parameter; extracting color feature data of the to-be-detected image to obtain first color feature data; extracting color feature data of the reference image to obtain second color feature data; and determining a detection result of the to-be-detected image according to a matching result of the first color feature data and the second color feature data. In this way, the color feature data of the image feature adjusted to-be-detected image is automatically matched with the color feature data of the reference image, and the detection result of the to-be-detected image is determined according to the matching result. The effect of image feature adjustment can be automatically verified, and the efficiency of image detection is improved. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.

[0047] Figure 1 is a scene schematic diagram of the image detection provided by the present application;

[0048] Figure 2 is a flow schematic diagram of the image detection method provided by the present application;

[0049] Figure 3 is another flow schematic diagram of the image detection method provided by the present application;

[0050] Figure 4is a structural schematic diagram of an image detection device provided by the present application;

[0051] Figure 5 is a structural schematic diagram of a terminal provided by the present application;

[0052] Figure 6 is a structural schematic diagram of a server provided by the present application. DETAILED DESCRIPTION

[0053] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person skilled in the art without creative work fall within the protection scope of the present application.

[0054] The embodiments of the present application provide an image detection method, device, computer readable storage medium and computer equipment. The image detection method can be used in an image detection device. The image detection device can be integrated in a computer equipment, which can be a terminal or a server. The terminal can be a mobile phone, a tablet computer, a notebook computer, a smart television, a wearable smart device, a personal computer (PC), a smart vehicle, etc. The server can be a physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and basic cloud computing services such as big data and artificial intelligence platforms.

[0055] Please refer to Figure 1 is a scene schematic diagram of image detection provided by the present application. As shown in the figure, when the computer equipment A obtains a to-be-detected image, the computer equipment A determines the target image feature adjustment parameter carried by the to-be-detected image. Then, the computer equipment A determines a reference image according to the to-be-detected image and the target image feature adjustment parameter, the reference image being an image determined by the target image feature adjustment parameter in a reference image set generated according to each image feature adjustment parameter; extracts color feature data of the to-be-detected image to obtain first color feature data; extracts color feature data of the reference image to obtain second color feature data; and determines a detection result of the to-be-detected image according to a matching result of the first color feature data and the second color feature data.

[0056] It should be noted that, Figure 1The illustrated image detection scene diagram is only an example, and the image detection scene described in the embodiments of the present application is used to more clearly illustrate the technical solutions of the present application, and does not constitute a limitation on the technical solutions provided by the present application. Those skilled in the art can know that, as the image detection evolves and new business scenarios appear, the technical solutions provided by the present application are also applicable to similar technical problems.

[0057] Based on the above implementation scenarios, the following will be described in detail.

[0058] The embodiments of the present application will be described from the perspective of an image detection device, which can be integrated in a computer device. The computer device can be a terminal or a server, and the terminal can be a mobile phone, a tablet computer, a notebook computer, a smart television, a wearable smart device, a personal computer (PC), and the like. As shown in the figure, Figure 2 As shown, the flowchart of the image detection method provided by the present application is shown, and the method comprises the following steps:

[0059] In step 101, an image feature adjusted to-be-detected image and a target image feature adjustment parameter corresponding to the to-be-detected image are obtained.

[0060] The to-be-detected image can be a single frame of image, or a frame of image extracted from a video. The to-be-detected image can be an image obtained by image editing on a frame of image, and the image editing can specifically be image feature adjustment on the image. The to-be-detected image can also be a frame of image in a video obtained by video editing on a video, and the video editing can specifically be image feature adjustment on each frame of image in the video. That is, the essence of editing the picture of the video is to edit the image, and therefore, in the embodiments of the present application, editing the image is taken as an example for specific description.

[0061] In the embodiments of the present application, the image editing can be image feature adjustment on the image, and the image feature adjustment includes, but is not limited to, brightness adjustment, contrast adjustment, saturation adjustment, light sensitivity adjustment, sharpening adjustment, and highlight adjustment on the image. The brightness, contrast, saturation, and the like can be referred to as image features of the image. For each image feature, there can be different degrees of adjustment effect, and the degree of adjustment effect can be evaluated according to 0 to 100. For example, the brightness of the image is adjusted to 50. The 50 is the parameter corresponding to the image feature "brightness".

[0062] In the related art, after image feature adjustment is performed on an image, an adjusted image is obtained. For the adjustment effect of this adjustment operation, only visual perception by a human being is currently available. A user can perceive the change in image features during the adjustment process, but cannot accurately determine whether the adjustment effect is accurate. For example, when the user adjusts the brightness of the image from 20 to 50, the user can perceive that the brightness of the image is becoming brighter, but cannot determine whether the brightness has reached 50 or has exceeded 50. Moreover, even if the user has very accurate perception of the brightness, the efficiency of manual verification is very low.

[0063] To solve the problem of poor accuracy and low efficiency in manual detection of the adjustment effect of image features, an image detection method is provided. The method is described in detail below.

[0064] First, an image detection device acquires a to-be-detected image, which is an image that has been subjected to image feature adjustment processing. Since the adjustment of image features is a targeted adjustment operation, only the target image feature adjustment parameter can be adjusted. Specifically, for example, when adjusting the brightness of an image, the target brightness parameter (for example, adjusting to 80) needs to be determined before the brightness of the image can be adjusted. Therefore, when the to-be-detected image is acquired, the target image feature adjustment parameter corresponding to the image feature adjustment of the to-be-detected image can also be acquired. The target image feature adjustment parameter includes a target image feature and a parameter corresponding to the target image feature. The target image feature can be brightness, and the corresponding parameter can be 80.

[0065] In some embodiments, acquiring the to-be-detected image after image feature adjustment and the target image feature adjustment parameter corresponding to the to-be-detected image includes:

[0066] 1. Acquiring a to-be-detected video after video feature adjustment and a target image feature adjustment parameter corresponding to the to-be-detected video;

[0067] 2. Dividing the to-be-detected video into multiple frames of images;

[0068] 3. Acquiring the texture complexity of each frame of image in the multiple frames of images, and sorting the multiple frames of images based on the texture complexity;

[0069] 4. Determining the image with the highest texture complexity in the multiple frames of images as the to-be-detected image.

[0070] In the embodiments of the present application, the to-be-detected image can be one frame of image in a to-be-detected video. The to-be-detected video is a video obtained by adjusting the image content of a target video according to target image feature adjustment parameters. The target video can be a preset template video, or any other non-template video. When the target video is a template video, the target video can be a video composed of multiple frames of the same template image. Since each frame of image in the template video is the same, the template video can also be referred to as a static video. In contrast, the target video can also be a non-template video, i.e., a dynamic video. When the target video is a static video, the to-be-detected video obtained by adjusting the image content of the target video is also a static video; when the target video is a dynamic video, the to-be-detected video obtained by adjusting the image content of the target video is also a dynamic video.

[0071] Regardless of whether the target video is a static video or a dynamic video, after obtaining the to-be-detected video obtained by adjusting the image content of the target video and the target image feature adjustment parameters corresponding to the video, the to-be-detected video can be further divided into multiple frames of image. It can be understood that when the target video is a static video, the multiple frames of image obtained by dividing the to-be-detected video are also completely the same; when the target video is a dynamic video, the multiple frames of image obtained by dividing the to-be-detected video are not completely the same.

[0072] After dividing the to-be-detected video into multiple frames of image, the image with the highest texture complexity is selected from the multiple frames of image as the to-be-detected image. Specifically, the texture complexity of each frame of image obtained by dividing can be obtained first, and then the multiple frames of image obtained by dividing can be sorted according to the texture complexity of the image. The sorting can be in the order from high to low or in the order from low to high, which is not limited here. Finally, the image with the highest texture complexity is determined as the to-be-detected image according to the sorting order. Since the higher the texture complexity of the image, the more boundary information the image contains, and the greater the difference between adjacent pixels in the image, the image is more suitable for image matching, therefore, selecting the image with the highest texture complexity as the to-be-detected image can further improve the accuracy of image detection.

[0073] Since the image feature adjustment of the video is also the image feature adjustment of each frame of image in the video, the target image feature adjustment parameters used for the image feature adjustment of the target video are also the target image feature adjustment parameters used for the image feature adjustment of the to-be-detected image.

[0074] In some embodiments, obtaining the texture complexity of each frame of image in the multiple frames of image includes:

[0075] A. dividing each frame of image in the multiple frames of image into multiple pixels;

[0076] B, obtaining a gray value of each pixel, and generating a gray histogram corresponding to each frame of image based on the gray value;

[0077] C, determining the texture complexity of each frame of image according to the gray histogram corresponding to each frame of image.

[0078] In the embodiment of the present application, the texture complexity of each frame of image is calculated, which can be divided into a plurality of pixels. Then, the gray value of each pixel obtained by dividing the frame of image is obtained. The gray value of each pixel is from 0 to 100, which is used to represent the object with black tone. That is, when the pixel is white, the gray value is 0; when the pixel is black, the gray value is 100. After obtaining the gray value of each pixel, the gray histogram corresponding to each image is generated according to the gray value of each pixel, and finally the texture complexity of each frame of image is determined according to the gray histogram of each frame of image.

[0079] Step 102, determining the reference image according to the image to be detected and the target image feature adjustment parameter.

[0080] After obtaining the image to be detected and the target image feature adjustment parameter for image feature adjustment of the image to be detected, the reference image corresponding to the image to be detected is determined according to the image to be detected and the image feature adjustment parameter. The reference image can be an image determined from the reference image set according to the target image feature adjustment parameter, and the reference image set is an image generated according to different image feature adjustment parameters corresponding to the image to be detected. Specifically, for example, the image feature is the image brightness, and the corresponding image feature adjustment parameter can be 0 to 100. Then, 101 images from brightness 0 to brightness 100 can be generated to form the reference image set according to the image to be detected. Assuming that the target image feature adjustment parameter is 80, the image with brightness 80 can be selected from the reference image set as the reference image.

[0081] The processing process of generating the reference image set and the processing process of image feature adjustment of the image to be detected are executed by different devices. For example, the image to be detected is an image obtained by adjusting the image feature of the target image by the application program in the first terminal. The image detection device of the present application obtains the image to be detected after image feature adjustment from the first terminal, generates the reference image set in the image detection device of the present application during the detection process, and then further determines the reference image from the reference image set. The function of the image detection device of the present application to generate the reference image set based on the image to be detected and the target image feature adjustment parameter can be calibrated. The calibration here can be manual calibration or automatic calibration by the device.

[0082] In some embodiments, the reference image is determined according to the image to be detected and the target image feature adjustment parameter, comprising:

[0083] 1. sending the image to be detected to a server so that the server generates a reference image set corresponding to each image feature adjustment parameter according to the image to be detected;

[0084] 2. receiving the reference image set returned by the server;

[0085] 3. determining the reference image from the reference image set according to the target image feature adjustment parameter.

[0086] In the embodiments of the present application, after the image detection device acquires the image to be detected and the target image feature adjustment parameter corresponding to the image to be detected, the image detection device can send the image to be detected to the server, and the server generates a reference image set composed of reference images corresponding to each image feature adjustment parameter according to the image to be detected, and then returns the generated reference image set to the image detection device. The image detection device determines the reference image corresponding to the target image feature adjustment parameter from the reference image set according to the target image feature adjustment parameter.

[0087] In some embodiments, the image detection device can also send the image to be detected and the target image feature adjustment parameter to the server at the same time. The server directly generates the reference image corresponding to the target image feature adjustment parameter according to the image to be detected and the target image feature adjustment parameter, and then sends the reference image to the image detection device.

[0088] In some embodiments, when the image to be detected is an image obtained by adjusting the template image by the image feature adjustment, the image detection device can also prestore a reference image set composed of the template image and the image corresponding to each image feature adjustment parameter. In this way, after acquiring the image to be detected and the target image feature adjustment parameter corresponding to the image to be detected, the reference image corresponding to the target image feature adjustment parameter can be directly extracted from the pre-stored reference image set according to the target image feature adjustment parameter. The pre-stored reference image set corresponding to the template image can also be a calibrated image set. Here, the calibration can be artificial calibration or automatic calibration by a device.

[0089] Step 103, extracting color feature data of the image to be detected to obtain first color feature data.

[0090] Wherein, after the to-be-detected image and the reference image corresponding to the to-be-detected image are determined, the color feature data of the to-be-detected image and the reference image can be extracted respectively. So as to judge whether the to-be-detected image and the reference image are the same according to the color feature data of both. Specifically, when the to-be-detected image is a black and white image, the color feature data of the to-be-detected image can be the data composed of the gray values of each pixel thereof. When the to-be-detected image is a color image, the color feature data of the to-be-detected image can be the data composed of the RGB (Red Green Blue) channel values of each pixel thereof. Wherein, the RGB color mode is a color standard in the industry, and various colors are obtained through the changes of the three color channels of red (R), green (G) and blue (B) and the superposition between them. RGB represents the three channels of red, green and blue colors. This standard almost includes all the colors that can be perceived by human vision, and is one of the most widely used color systems.

[0091] In some embodiments, the color feature data of the to-be-detected image is extracted to obtain first color feature data, comprising:

[0092] 1. The to-be-detected image is divided into a plurality of pixels;

[0093] 2. The RGB channel values of each pixel are extracted, and the first color feature data is determined according to the RGB channel values.

[0094] Wherein, in the embodiments of the present application, the color feature data of the to-be-detected image can be determined by the values of each pixel in the to-be-detected image on the RGB three channels. Specifically, the to-be-detected image can be divided into a plurality of pixels according to the pixel unit, and the plurality of pixels contained in the to-be-detected image are obtained. Wherein, the pixel can be regarded as an indivisible unit or element in the whole image. The meaning of indivisibility is that it cannot be cut into smaller units or elements, and it exists in the form of a small grid with a single color. The color of each pixel can be represented by its values on the RGB channel. Therefore, the values of each pixel on the RGB channel obtained by dividing the to-be-detected image can be extracted.

[0095] Specifically, assuming that the length and width of the to-be-detected image are divided into m and n pixels respectively, the total number of pixels obtained by dividing the to-be-detected image is m*n. Then the RGB channel values of each pixel are extracted, and a total of 3*m*n values are obtained. Then the 3*m*n values are sorted according to a preset rule, and the first color feature data corresponding to the to-be-detected image can be obtained.

[0096] In some embodiments, the first color feature data is determined according to the RGB channel values, comprising:

[0097] 2.1, calculate a first mean value of R channel values, a second mean value of G channel values, and a third mean value of B channel values;

[0098] 2.2, determine the first color feature data according to the first mean value, the second mean value, and the third mean value.

[0099] In the embodiment of the present application, after the RGB three channel values of each pixel are extracted, the R channel values of all the pixels are averaged to obtain the first mean value of the R channel values. Similarly, the mean values of the G channel values and the B channel values are calculated to obtain the second mean value of the G channel values and the third mean value of the B channel values. Then, the first mean value, the second mean value, and the third mean value are taken as the first color feature data.

[0100] In some embodiments, the first color feature data is determined according to the first mean value, the second mean value, and the third mean value, including:

[0101] 2.2.1, calculate a first variance of R channel values, a second variance of G channel values, and a third variance of B channel values;

[0102] 2.2.2, determine the first color feature data according to the first mean value, the second mean value, the third mean value, the first variance, the second variance, and the third variance.

[0103] In the embodiment of the present application, after the RGB three channel values of each pixel are extracted, the R channel values of all the pixels are averaged to obtain the first mean value of the R channel values. Similarly, the mean values of the G channel values and the B channel values are calculated to obtain the second mean value of the G channel values and the third mean value of the B channel values. Then, the first mean value, the second mean value, and the third mean value are taken as the first color feature data.

[0104] In some embodiments, the color feature data of the to-be-detected image is extracted to obtain the first color feature data, including:

[0105] A, divide the to-be-detected image into a plurality of pixels;

[0106] B, extract the HSV channel values of each pixel, and determine the first color feature data according to the HSV channel values.

[0107] In the embodiments of the present application, the value of the HSV (Hue, Saturation, Value) channel of each pixel obtained by dividing the to-be-detected image can also be extracted as the first color feature data. H is hue, S is saturation, and V is brightness. Generally, the model for extracting the value of the RGB channel of an image is a hardware-oriented model, and the model for extracting the value of the HSV channel of an image is a user-oriented model. The value of each pixel on the HSV channel can also be used as the first color feature data of the to-be-detected image to represent the color feature of the to-be-detected image.

[0108] In step 104, the color feature data of the reference image is extracted to obtain second color feature data.

[0109] After the first color feature data of the to-be-detected image is extracted, the second color feature data of the reference image is further extracted. The method for extracting the second color feature data of the reference image is the same as the method for extracting the first color feature data of the to-be-detected image. That is, when all the data of the RGB channel of each pixel of the to-be-detected image is used as the first color feature data, all the data of the RGB channel of each pixel of the reference image also needs to be collected as the second color feature data. Moreover, the sorting order of the first color feature data and the second color feature data should be consistent.

[0110] In step 105, the detection result of the to-be-detected image is determined according to the matching result of the first color feature data and the second color feature data.

[0111] After the first color feature data of the to-be-detected image and the second color feature data of the reference image are extracted, the first color feature data and the second color feature data can be matched, which is one-by-one matching according to a preset order. Specifically, for example, in the foregoing example, if the to-be-detected image can be divided into m*n pixels, the value of the RGB channel of each pixel is extracted to obtain 3*m*n data. The 3*m*n data can be arranged according to a certain preset order, for example, m*n data corresponding to the R channel are arranged in the front, m*n data corresponding to the G channel are arranged in the middle, and m*n data corresponding to the B channel are arranged in the back. Similarly, the value of the RGB channel of each pixel of the reference image is also extracted and arranged according to the foregoing preset sorting order. Then, the first color feature data of the to-be-detected image and the second color feature data of the reference image are matched one by one according to the sorting order.

[0112] When the first color feature data and the second color feature data match, it can be determined that the to-be-detected image is identical to the reference image, i.e., the detection result of the image detection is qualified. When the first color feature data and the second color feature data do not match, it can be determined that the to-be-detected image is different from the reference image, i.e., the detection result of the image detection is unqualified.

[0113] In the image detection method provided in the present application, the image editing function of the video editing application or the image editing application loaded in the terminal connected to the server can be tested. Specifically, the image edited by the video editing application or the image editing application loaded in the target terminal can be detected. When the detection result is qualified, it is determined that the image editing function of the video editing application or the image editing application loaded in the target terminal is normal. When the detection result is unqualified, it is determined that the image editing function of the video editing application or the image editing application loaded in the target terminal is abnormal, and the target terminal loading the application program can be fed back the abnormality to prompt the target terminal to update the application program.

[0114] According to the above description, the image detection method provided in the embodiments of the present application can obtain the to-be-detected image after image feature adjustment and the target image feature adjustment parameter corresponding to the to-be-detected image; determine the reference image according to the to-be-detected image and the target image feature adjustment parameter, the reference image being an image determined by the target image feature adjustment parameter in a reference image set generated according to each image feature adjustment parameter; extract the color feature data of the to-be-detected image to obtain first color feature data; extract the color feature data of the reference image to obtain second color feature data; and determine the detection result of the to-be-detected image according to the matching result of the first color feature data and the second color feature data. In this way, the color feature data of the to-be-detected image after image feature adjustment is automatically matched with the color feature data of the reference image, and the detection result of the to-be-detected image is determined according to the matching result. The effect of image feature adjustment can be automatically verified, and the efficiency of image detection is improved.

[0115] Accordingly, the image detection method provided in the present application will be described in detail from the perspective of a computer device, which can be a terminal or a server. As shown in Figure 3 The image detection method provided in the present application includes the following steps:

[0116] In step 201, the computer device obtains a to-be-detected image and a target image feature adjustment parameter corresponding to the to-be-detected image.

[0117] In the embodiments of the present application, the image to be detected can be an image in a video obtained by adjusting the image features of a template video generated by a target video editing application loaded in a target terminal. The image detection method provided in the present application can detect the video editing effect of the target video editing application loaded in the target terminal.

[0118] Specifically, the video editing function of the video editing application loaded in the terminal can include, but is not limited to, brightness adjustment, contrast adjustment, saturation adjustment, light sensitivity adjustment, sharpening adjustment, and highlight adjustment. That is, the video editing in the present application can be adjusting the image features in the video. When it is necessary to verify the image editing effect of a target video editing application loaded in a certain terminal (which can be referred to as a target terminal), the target video editing application can be used to edit the video of the target video, and obtain a video to be detected. The target video can be a video generated by combining multiple identical target images. Since each frame of image in the target video is identical, the target video is a static video. It can be understood that the target video edited by the target video editing application, i.e., the image features of the target video are adjusted, is also a static video, i.e., each frame of image in the video to be detected is also identical. Therefore, an image can be randomly taken from the video to be detected as an image to be detected.

[0119] When the target application is used to adjust the image features of the target video, certain image feature adjustment parameters will be used. The image feature adjustment parameters can be determined by the user or adjusted according to preset target image feature adjustment parameters. In the present application, the preset target image feature adjustment parameters are used to adjust the image features of the target video as an example for illustration. Specifically, the target image feature can be the sharpening degree of the image, and the target image feature adjustment parameter a is used to adjust the sharpening of the target video, and obtain a video to be detected. Any frame of image in the video to be detected is an image to be detected, and a is the target image feature adjustment parameter used to adjust the image features of the image to be detected. a is a natural number.

[0120] In step 202, the computer device extracts a reference image corresponding to the target image feature adjustment parameter from a preset reference image set.

[0121] The reference image set is a set of images corresponding to different image feature adjustment parameters generated according to the target image. For example, when performing sharpening adjustment on the target image, the sharpening parameter can be set to any natural number between 0 and 100. Then, for any target image, different degrees of sharpening adjustment can be performed on the image to obtain 101 images, which form a reference image set corresponding to the target image and different image feature adjustment parameters. The image feature adjustment effect of the reference image in the reference image set can be calibrated, where the calibration can be performed manually or by a device.

[0122] Then, the reference image is determined in the reference image set according to the target image feature adjustment parameter. Specifically, for example, the parameter for sharpening the image is a, then the reference image with the sharpening value of a can be determined from the 101 images with different sharpening degrees as the reference image of the to-be-detected image.

[0123] Step 203, the computer device extracts the RGB channel value of each pixel in the to-be-detected image.

[0124] The computer device obtains the to-be-detected image and the target image feature adjustment parameter from the to-be-detected video, and further determines the reference image from the preset reference image set based on the target image feature adjustment parameter, and then further divides the to-be-detected image by pixel to obtain a plurality of pixels. Then, for each pixel, the value on the RGB channel of the pixel can be extracted respectively to obtain the value of each pixel on the RGB channel. Specifically, assuming that the width of the target image is w and the height is h, the unit is the side length of one pixel; that is, the target image can be divided into w pixels in the width direction and h pixels in the height direction, or said otherwise, the target image can be divided into h rows or w columns. Similarly, the to-be-detected image can also be divided into h rows or w columns, finally obtaining w*h pixels. Then the value of the RGB channel of each pixel is extracted to obtain 3*w*h values.

[0125] Step 204, the computer device generates a first color feature parameter corresponding to the to-be-detected image based on the RGB channel value of each pixel in the to-be-detected image.

[0126] The computer device can average, calculate variance and sum the RGB channel values of each column of pixels in the to-be-detected image after obtaining the RGB channel values of each pixel in the to-be-detected image. As described above, the to-be-detected image has a width of w, and thus can be divided into w columns, each column containing h pixels. Then, for each column of pixels, the average, variance and sum of the R channel values can be calculated first, obtaining 3w values; and then the average, variance and sum of the G channel values and the B channel values can be calculated respectively, obtaining a total of 9w values.

[0127] Further, the average, variance and sum of the RGB channel values of each row of pixels in the to-be-detected image can also be calculated, obtaining 9h values. The computer device can take the 9(w+h) values calculated above as the first color feature parameter of the to-be-detected image.

[0128] In step 205, the computer device extracts the RGB channel values of each pixel in the reference image.

[0129] For the reference image, the computer device can also extract the RGB channel values by using the method described above for the to-be-detected image. Specifically, the computer device can divide the reference image into w*h pixels, and then extract the RGB channel values of each pixel, obtaining 3*w*h values.

[0130] In step 206, the computer device generates the second color feature parameter corresponding to the reference image based on the RGB channel values of each pixel in the reference image.

[0131] After extracting the RGB channel values of each pixel in the reference image to obtain 3*w*h values, the average, variance and sum of the RGB channel values of each column of pixels in the reference image can be calculated further, obtaining 9w values; and the average, variance and sum of the RGB channel values of each row of pixels in the reference image can be calculated further, obtaining 9h values. That is, a total of 9(w+h) values corresponding to the reference image can be calculated, which are taken as the second color feature parameter of the reference image.

[0132] In step 207, the computer device determines the editing effect of the target video editing application based on the matching result of the first color feature parameter and the second color feature parameter.

[0133] The computer device generates 9(w+h) numerical values corresponding to the to-be-detected image and 9(w+h) numerical values corresponding to the reference image respectively, and then compares the two groups of numerical values one by one according to a preset order. If the comparison result is that the two groups of data are completely same, it is determined that the video editing function of the target video editing application program of the target terminal is normal. If the comparison result is that the two groups of data are not completely same, it is determined that the target video editing application program of the target terminal has a function abnormality. At this time, a prompt message can be sent to the target terminal to prompt that the target video editing application program has a function abnormality, and then the target video editing application program is reminded to be updated.

[0134] According to the above description, the image detection method provided by the embodiment of the application can obtain the to-be-detected image after image feature adjustment and the target image feature adjustment parameter corresponding to the to-be-detected image; determine the reference image according to the to-be-detected image and the target image feature adjustment parameter, the reference image being an image determined by the target image feature adjustment parameter in a reference image set generated according to each image feature adjustment parameter; extract the color feature data of the to-be-detected image to obtain first color feature data; extract the color feature data of the reference image to obtain second color feature data; and determine the detection result of the to-be-detected image according to the matching result of the first color feature data and the second color feature data. In this way, the color feature data of the to-be-detected image after image feature adjustment is automatically matched with the color feature data of the reference image, and the detection result of the to-be-detected image is determined according to the matching result. The effect of image feature adjustment can be automatically verified, and the efficiency of image detection is improved.

[0135] In order to better implement the above method, the embodiment of the application further provides an image detection device, which can be integrated in a terminal.

[0136] For example, as shown in Figure 4 the structure schematic diagram of the image detection device provided by the embodiment of the application, the image detection device can include an acquisition unit 301, a first determination unit 302, a first extraction unit 303, a second extraction unit 304, and a second determination unit 305, as follows:

[0137] The acquisition unit 301 is configured to obtain the to-be-detected image after image feature adjustment and the target image feature adjustment parameter corresponding to the to-be-detected image.

[0138] The first determination unit 302 is configured to determine the reference image according to the to-be-detected image and the target image feature adjustment parameter, the reference image being an image determined by the target image feature adjustment parameter in a reference image set generated according to each image feature adjustment parameter.

[0139] The first extraction unit 303 is configured to extract color feature data of the to-be-detected image to obtain first color feature data.

[0140] The second extraction unit 304 is configured to extract color feature data of the reference image to obtain second color feature data.

[0141] The second determination unit 305 is configured to determine a detection result of the to-be-detected image according to a matching result of the first color feature data and the second color feature data.

[0142] In some embodiments, the first extraction unit comprises:

[0143] The first division subunit is configured to divide the to-be-detected image into a plurality of pixels.

[0144] The first extraction subunit is configured to extract a value of an RGB channel of each pixel and determine the first color feature data according to the value of the RGB channel.

[0145] In some embodiments, the extraction subunit comprises:

[0146] The calculation module is configured to calculate a first mean value of the R channel value, a second mean value of the G channel value, and a third mean value of the B channel value.

[0147] The first determination module is configured to determine the first color feature data according to the first mean value, the second mean value, and the third mean value.

[0148] In some embodiments, the first determination module comprises:

[0149] The calculation sub-module is configured to calculate a first variance of the R channel value, a second variance of the G channel value, and a third variance of the B channel value.

[0150] The determination sub-module is configured to determine the first color feature data according to the first mean value, the second mean value, the third mean value, the first variance, the second variance, and the third variance.

[0151] In some embodiments, the first determination unit comprises:

[0152] The sending subunit is configured to send the to-be-detected image to a server to enable the server to generate a reference image set corresponding to each image feature adjustment parameter according to the to-be-detected image.

[0153] The receiving subunit is configured to receive the reference image set returned by the server.

[0154] The first determination subunit is configured to determine a reference image from the reference image set according to the target image feature adjustment parameter.

[0155] In some embodiments, the acquisition unit comprises:

[0156] a first obtaining subunit, configured to obtain a video to be detected after video feature adjustment and target image feature adjustment parameters corresponding to the video to be detected;

[0157] a second dividing subunit, configured to divide the video to be detected into multiple frames of images;

[0158] a second obtaining subunit, configured to obtain texture complexity of each frame of image in the multiple frames of images, and sort the multiple frames of images based on the texture complexity;

[0159] a second determining subunit, configured to determine an image with the highest texture complexity in the multiple frames of images as the image to be detected.

[0160] In some embodiments, the second obtaining subunit comprises:

[0161] a dividing module, configured to divide each frame of image in the multiple frames of images into multiple pixels;

[0162] an obtaining module, configured to obtain a gray value of each pixel, and generate a gray histogram corresponding to each frame of image based on the gray value;

[0163] a second determining module, configured to determine the texture complexity of each frame of image according to the gray histogram corresponding to each frame of image.

[0164] In some embodiments, the first extracting unit comprises:

[0165] a third dividing subunit, configured to divide the image to be detected into multiple pixels;

[0166] a second extracting subunit, configured to extract a value of an HSV channel of each pixel, and determine the first color feature data according to the value of the HSV channel.

[0167] In implementation, each of the above units can be implemented as an independent entity, or can be combined as the same or several entities, and the specific implementation of each of the above units can be referred to the method embodiments above, which will not be described here.

[0168] According to the above description, the image detection method provided by the embodiment of the application can obtain the image feature adjusted to-be-detected image and the target image feature adjustment parameter corresponding to the to-be-detected image through the obtaining unit 301; the first determining unit 302 determines the reference image according to the to-be-detected image and the target image feature adjustment parameter, the reference image being an image determined by the target image feature adjustment parameter in the reference image set generated according to each image feature adjustment parameter; the first extracting unit 303 extracts the color feature data of the to-be-detected image to obtain the first color feature data; the second extracting unit 304 extracts the color feature data of the reference image to obtain the second color feature data; and the second determining unit 305 determines the detection result of the to-be-detected image according to the matching result of the first color feature data and the second color feature data. In this way, the color feature data of the image feature adjusted to-be-detected image is automatically matched with the color feature data of the reference image, and the detection result of the to-be-detected image is determined according to the matching result. The effect of image feature adjustment can be automatically verified, and thus the efficiency of image detection is improved.

[0169] The embodiment of the application further provides a computer device, which can be a terminal. Figure 5 As shown in the figure, the terminal can include radio frequency (RF, Radio Frequency) circuit 401, memory 402 including one or more computer readable storage media, input unit 403, display unit 404, sensor 405, audio circuit 406, wireless fidelity (WiFi, Wireless Fidelity) module 407, processor 408 including one or more processing cores, and power supply 409, etc. Those skilled in the art can understand that the terminal structure shown in the figure does not constitute a limitation on the terminal, and can include more or fewer components than the figure, or combine certain components, or different component arrangements. Among them: Figure 5

[0170] ​The RF circuit 401 can be used for receiving and sending signals in the process of information or communication, in particular, receiving the downlink information from the base station and sending the uplink data to the base station. Generally, the RF circuit 401 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, etc. In addition, the RF circuit 401 can also communicate with a network and other devices through wireless communication. The wireless communication can use any communication standards or protocols, including but not limited to Global System for Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0171] The memory 402 can be used to store software programs and modules, and the processor 408 can execute various functions and information interactions by running the software programs and modules stored in the memory 402. The memory 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc.; the data storage area can store data created according to the use of the terminal (such as audio data, a phone book, etc.), etc. In addition, the memory 402 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 402 can also include a memory controller to provide access for the processor 408 and the input unit 403 to the memory 402.

[0172] The input unit 403 can be configured to receive input digital or character information, and generate a key signal, a mouse signal, a joystick signal, an optical or a track ball signal, etc. related to user's setting and function control. Specifically, in one embodiment, the input unit 403 can include a touch-sensitive surface and other input devices. The touch-sensitive surface, also known as a touch display or a touch pad, can collect a touch operation (e.g., a user's operation using a finger, a stylus, or any suitable object or accessory on or near the touch-sensitive surface) on or near the touch-sensitive surface, and drive a corresponding connection device according to a pre-set program. Optionally, the touch-sensitive surface can include two parts, a touch detection device and a touch controller. The touch detection device detects a user's touch position and detects a signal caused by a touch operation, and transmits the signal to the touch controller. The touch controller receives the touch information from the touch detection device, converts it into touch coordinates, and sends it to the processor 408, and can receive a command from the processor 408 and execute it. In addition, the touch-sensitive surface can be implemented in various types such as a resistive type, a capacitive type, an infrared type, and a surface acoustic wave type. In addition to the touch-sensitive surface, the input unit 403 can include other input devices. Specifically, the other input devices can include one or more of a physical keyboard, a function key (e.g., a volume control button, an on / off button, etc.), a trackball, a mouse, a joystick, etc.

[0173] The display unit 404 can be configured to display information input by a user or information provided to the user, and various graphical user interfaces of the terminal, which can be constituted by graphics, text, icons, video, and any combination thereof. The display unit 404 can include a display panel, which can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch-sensitive surface can cover the display panel, and when the touch-sensitive surface detects a touch operation on or near the touch-sensitive surface, it transmits to the processor 408 to determine the type of touch event, and then the processor 408 provides a corresponding visual output on the display panel according to the type of touch event. Although in the above description, the touch-sensitive surface and the display panel are implemented as two independent components to achieve input and output functions, in some embodiments, the touch-sensitive surface and the display panel can be integrated to achieve input and output functions. Figure 5

[0174] ​The terminal can also include at least one sensor 405, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor can include an ambient light sensor that can adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that can turn off the display panel and / or backlight when the terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and when at rest, can detect the magnitude and direction of gravity, and can be used for identifying the posture of the mobile phone (such as switching between landscape and portrait screens, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometers, tapping), and the like. As for other sensors that the terminal can also be configured, such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, they will not be described here.

[0175] The audio circuit 406, the speaker, and the microphone can provide an audio interface between the user and the terminal. The audio circuit 406 can convert the received audio data into an electrical signal and transmit it to the speaker, which converts the electrical signal into a sound signal and outputs it. On the other hand, the microphone collects a sound signal and converts it into an electrical signal, which is received by the audio circuit 406 and converted into audio data. The audio data is output to the processor 408 for processing, and then transmitted to another terminal via the RF circuit 401, or output to the memory 402 for further processing. The audio circuit 406 can also include a jack for connecting external earphones to the terminal.

[0176] WiFi is a short-range wireless transmission technology. The terminal can help the user to send and receive emails, browse web pages, and access streaming media through the WiFi module 407, which provides the user with wireless broadband Internet access. Although Figure 5 The WiFi module 407 is shown, but it is understood that it is not an essential component of the terminal and can be omitted without changing the essence of the application.

[0177] The processor 408 is the control center of the terminal, which connects all parts of the terminal through various interfaces and lines, executes various functions of the terminal and processes data by running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, thereby monitoring the terminal as a whole. Optionally, the processor 408 can include one or more processing cores; preferably, the processor 408 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 408.

[0178] The terminal also includes a power supply 409 (such as a battery) for supplying power to each component. Preferably, the power supply can be logically connected to the processor 408 through a power management system, so that the power management system can realize functions such as management of charging, discharging, and power consumption management. The power supply 409 can also include one or more direct current or alternating current power supplies, a recharging system, a power supply fault detection circuit, a power supply converter or inverter, a power supply status indicator, and any other components.

[0179] Although not shown, the terminal can also include a camera, a Bluetooth module, and the like, which will not be described here. In the present embodiment, the processor 408 in the terminal will load the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and run the application program stored in the memory 402 by the processor 408, so as to realize various functions:

[0180] Obtain the image feature adjusted to-be-detected image and the target image feature adjustment parameter corresponding to the to-be-detected image; determine a reference image according to the to-be-detected image and the target image feature adjustment parameter, the reference image being an image determined by the target image feature adjustment parameter from a set of reference images generated according to each image feature adjustment parameter; extract color feature data of the to-be-detected image to obtain first color feature data; extract color feature data of the reference image to obtain second color feature data; and determine a detection result of the to-be-detected image according to a matching result of the first color feature data and the second color feature data.

[0181] It should be noted that the computer device provided in the embodiments of the present application and the method in the above embodiments belong to the same concept, and the specific implementation of each operation can be referred to the previous embodiments, which will not be described here.

[0182] The embodiments of the present application also provide a computer device, which can be a server, as shown in Figure 6 , which is a structural schematic diagram of the computer device provided in the present application. Specifically:

[0183] The computer device can include a processing unit 501 having one or more processing cores, a storage unit 502 having one or more storage media, a power supply module 503, and an input module 504, and the like. Those skilled in the art can understand that the computer device structure shown in Figure 6 does not constitute a limitation on the computer device, and can include more or fewer components than shown, or combine certain components, or different component arrangements. Among them:

[0184] The processing unit 501 is the control center of the computer device, connects each part of the computer device through various interfaces and lines, executes various functions of the computer device and processes data by running or executing software programs and / or modules stored in the storage unit 502 and calling data stored in the storage unit 502, thereby overall monitoring the computer device. Optionally, the processing unit 501 can include one or more processing cores; preferably, the processing unit 501 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processing unit 501.

[0185] The storage unit 502 can be used to store software programs and modules, and the processing unit 501 executes various functions and data processing by running the software programs and modules stored in the storage unit 502. The storage unit 502 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, and a web page access, etc.), etc.; the data storage area can store data created according to the use of the computer device, etc. In addition, the storage unit 502 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the storage unit 502 can also include a memory controller to provide access of the processing unit 501 to the storage unit 502.

[0186] The computer device further includes a power module 503 for powering each component, and preferably, the power module 503 can be logically connected to the processing unit 501 through a power management system, thereby realizing functions such as management of charging, discharging, and power consumption management through the power management system. The power module 503 can also include one or more than one direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power state indicator, etc. any component.

[0187] The computer device can also include an input module 504, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0188] Although not shown, the computer device can further include a display unit and the like, which will not be described here. Specifically in the present embodiment, the processing unit 501 in the computer device will load the executable file corresponding to the process of one or more than one application program into the storage unit 502 according to the following instructions, and run the application program stored in the storage unit 502 by the processing unit 501, thereby realizing various functions, as follows:

[0189] The image feature adjusted to-be-detected image and the target image feature adjustment parameter corresponding to the to-be-detected image are acquired; a reference image is determined according to the to-be-detected image and the target image feature adjustment parameter, the reference image being an image determined by the target image feature adjustment parameter from a set of reference images generated according to each image feature adjustment parameter; color feature data of the to-be-detected image is extracted to obtain first color feature data; color feature data of the reference image is extracted to obtain second color feature data; and a detection result of the to-be-detected image is determined according to a matching result of the first color feature data and the second color feature data.

[0190] It should be noted that the computer device provided by the embodiments of the present application and the method in the above embodiments belong to the same concept, and the specific implementation of the above operations can be referred to the previous embodiments, which will not be described here.

[0191] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by related hardware controlled by the instructions, which can be stored in a computer readable storage medium and loaded and executed by a processor.

[0192] Therefore, the embodiments of the present application provide a computer readable storage medium, which stores a plurality of instructions. The instructions can be loaded by a processor to execute the steps in any of the methods provided by the embodiments of the present application. For example, the instructions can execute the following steps:

[0193] The image feature adjusted to-be-detected image and the target image feature adjustment parameter corresponding to the to-be-detected image are acquired; a reference image is determined according to the to-be-detected image and the target image feature adjustment parameter, the reference image being an image determined by the target image feature adjustment parameter from a set of reference images generated according to each image feature adjustment parameter; color feature data of the to-be-detected image is extracted to obtain first color feature data; color feature data of the reference image is extracted to obtain second color feature data; and a detection result of the to-be-detected image is determined according to a matching result of the first color feature data and the second color feature data.

[0194] The specific implementation of the above operations can be referred to the previous embodiments, which will not be described here.

[0195] The computer readable storage medium can include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0196] The steps in any of the methods provided by the embodiments of the present application can be executed due to the instructions stored in the computer readable storage medium, thus the beneficial effects of any of the methods provided by the embodiments of the present application can be achieved, which are described in detail in the foregoing embodiments and will not be repeated here.

[0197] According to an aspect of the present application, a computer program product or a computer program is provided, which includes computer instructions stored in a storage medium. A processor of a computer device reads the computer instructions from the storage medium, and the processor executes the computer instructions to enable the computer device to perform the method provided in any of the various optional implementation manners of the above Figure 2 or Figure 3 .

[0198] The above describes in detail the image detection method, device, computer readable storage medium and computer device provided by the embodiments of the present application. The principles and implementation manners of the present application are described by applying specific examples. The above description of the embodiments is only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, the specific implementation manners and application ranges can be changed according to the idea of the present application. In conclusion, the content of the specification should not be understood as a limitation of the present application.

Claims

1. An image detection method characterized by, The method comprises: obtaining an image feature adjusted to-be-detected image and a target image feature adjustment parameter corresponding to the to-be-detected image; determining a reference image according to the to-be-detected image and the target image feature adjustment parameter, the reference image being an image determined from a reference image set generated according to each image feature adjustment parameter according to the target image feature adjustment parameter; extracting color feature data of the to-be-detected image to obtain first color feature data; extracting color feature data of the reference image to obtain second color feature data; determining a detection result of the to-be-detected image according to a matching result of the first color feature data and the second color feature data.

2. The method of claim 1, wherein, The extraction of the color feature data of the to-be-detected image to obtain the first color feature data comprises: dividing the to-be-detected image into a plurality of pixels; extracting a value of an RGB channel of each pixel and determining first color feature data according to the value of the RGB channel.

3. The method of claim 2, wherein, The determination of the first color feature data according to the value of the RGB channel comprises: calculating a first mean value of an R channel value, a second mean value of a G channel value, and a third mean value of a B channel value; determining first color feature data according to the first mean value, the second mean value, and the third mean value.

4. The method of claim 3, wherein, The determination of the first color feature data according to the first mean value, the second mean value, and the third mean value comprises: calculating a first variance of an R channel value, a second variance of a G channel value, and a third variance of a B channel value; determining first color feature data according to the first mean value, the second mean value, the third mean value, the first variance, the second variance, and the third variance.

5. The method of claim 1, wherein, The determination of the reference image according to the to-be-detected image and the target image feature adjustment parameter comprises: sending the to-be-detected image to a server to enable the server to generate a reference image set corresponding to each image feature adjustment parameter according to the to-be-detected image; receiving the reference image set returned by the server; determining a reference image from the reference image set according to the target image feature adjustment parameter.

6. The method of claim 1, wherein, The obtaining of the image feature adjusted to-be-detected image and the target image feature adjustment parameter corresponding to the to-be-detected image comprises: obtaining a video feature adjusted to-be-detected video and a target image feature adjustment parameter corresponding to the to-be-detected video; dividing the to-be-detected video into a plurality of images; obtaining a texture complexity of each image in the plurality of images and sorting the plurality of images based on the texture complexity; determining an image with the highest texture complexity in the plurality of images as the to-be-detected image.

7. The method of claim 6, wherein, The obtaining of the texture complexity of each image in the plurality of images comprises: dividing each image in the plurality of images into a plurality of pixels; obtaining a gray value of each pixel and generating a gray histogram corresponding to each image based on the gray value; determining a texture complexity of each image according to the gray histogram corresponding to each image.

8. The method of claim 1, wherein, The extraction of the color feature data of the to-be-detected image to obtain the first color feature data comprises: dividing the image to be detected into a plurality of pixels; extracting a value of an HSV channel of each pixel, and determining first color feature data according to the value of the HSV channel.

9. An image detection apparatus characterized by comprising: The device comprises: an acquisition unit configured to acquire an image to be detected after image feature adjustment and a target image feature adjustment parameter corresponding to the image to be detected; a first determination unit configured to determine a reference image according to the image to be detected and the target image feature adjustment parameter, the reference image being an image determined by the target image feature adjustment parameter in a set of reference images generated according to each image feature adjustment parameter; a first extraction unit configured to extract color feature data of the image to be detected to obtain first color feature data; a second extraction unit configured to extract color feature data of the reference image to obtain second color feature data; a second determination unit configured to determine a detection result of the image to be detected according to a matching result of the first color feature data and the second color feature data.

10. The apparatus of claim 9, wherein, The first extraction unit comprises: a first division subunit configured to divide the image to be detected into a plurality of pixels; a first extraction subunit configured to extract a value of an RGB channel of each pixel, and determine first color feature data according to the value of the RGB channel.

11. The apparatus of claim 10, wherein, The extraction subunit comprises: a calculation module configured to calculate a first mean value of R channel values, a second mean value of G channel values, and a third mean value of B channel values; a first determination module configured to determine first color feature data according to the first mean value, the second mean value, and the third mean value.

12. The apparatus of claim 11, wherein, The first determination module comprises: a calculation sub-module configured to calculate a first variance of R channel values, a second variance of G channel values, and a third variance of B channel values; a determination sub-module configured to determine first color feature data according to the first mean value, the second mean value, the third mean value, the first variance, the second variance, and the third variance.

13. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a plurality of instructions, which are suitable for being loaded by a processor to execute the steps of the image detection method in any one of claims 1 to 8.

14. A computer device, comprising: The computer program comprises computer instructions stored in a storage medium, a processor of a computer device reads the computer instructions from the storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of the image detection method in any one of claims 1 to 8.

15. A computer program, characterized in that, The computer program comprises computer instructions stored in a storage medium, a processor of a computer device reads the computer instructions from the storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of the image detection method in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Color detection method and terminal

    CN109155071A

  • Image management method and device, terminal and storage medium

    CN111405191A