WO2022012573A1 - Image processing method and apparatus, electronic device, and storage medium - Google Patents

Image processing method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2022012573A1
WO2022012573A1 PCT/CN2021/106200 CN2021106200W WO2022012573A1 WO 2022012573 A1 WO2022012573 A1 WO 2022012573A1 CN 2021106200 W CN2021106200 W CN 2021106200W WO 2022012573 A1 WO2022012573 A1 WO 2022012573A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
sub
regions
region
target
Prior art date
Application number
PCT/CN2021/106200
Other languages
French (fr)
Chinese (zh)
Inventor
马欣
祝夭龙
Original Assignee
北京灵汐科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京灵汐科技有限公司 filed Critical 北京灵汐科技有限公司
Publication of WO2022012573A1 publication Critical patent/WO2022012573A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/154Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Definitions

  • the present disclosure relates to the technical field of image processing, and in particular, to an image processing method, an image processing apparatus, an electronic device, and a readable storage medium.
  • Image content analysis is a common image processing technique.
  • the main process of image content analysis is to obtain video images from the camera, decode the video images, and then perform content analysis on each decoded image.
  • Embodiments of the present disclosure provide an image processing method, an image processing apparatus, an electronic device, and a readable storage medium.
  • an embodiment of the present disclosure provides an image processing method, including:
  • the sub-region quality score representing the image quality of the image sub-region
  • the image quality score of the first image is determined according to the sub-region quality score of each of the image sub-regions, and the image quality score represents the image quality of the first image.
  • an embodiment of the present disclosure provides an image processing method, including:
  • target position information is generated, wherein the target position information represents the position of the target object in the image to be analyzed, and the target The location information is used to determine the location weights of multiple image sub-regions in the first image when determining the image quality score of the first image, where the first image is an image collected after the image to be analyzed, and multiple The adjacent image sub-regions in the image sub-regions have overlapping regions.
  • an image processing apparatus including:
  • a dividing module configured to divide the first image into regions to obtain a plurality of image sub-regions, wherein adjacent image sub-regions in the plurality of image sub-regions have overlapping regions;
  • a calculation module configured to determine a sub-region quality score of each of the image sub-regions, where the sub-region quality score represents the image quality of the image sub-region;
  • An acquisition module configured to determine an image quality score of the first image according to the sub-region quality scores of each of the image sub-regions, where the image quality score represents the image quality of the first image.
  • an image processing apparatus including:
  • the analysis module is used to analyze the content of the image to be analyzed, and obtain the content analysis result;
  • the feedback module is configured to generate target position information when the content analysis result indicates that the image to be analyzed includes a target object, wherein the target position information represents the position of the target object in the image to be analyzed. position, the target position information is used to determine the position weight of a plurality of image sub-regions in the first image when the image quality score of the first image is determined, and the first image is collected after the image to be analyzed image, and adjacent image sub-regions among the plurality of image sub-regions have overlapping regions.
  • an embodiment of the present disclosure provides an electronic device, including: a memory, a processor, and a program or instruction stored on the memory and executable on the processor, where the program or instruction is processed by the processor implements at least one of the following methods when executing:
  • an embodiment of the present disclosure provides a readable storage medium, where a program or an instruction is stored thereon, and when the program or instruction is executed by a processor, at least one of the following methods is implemented:
  • the image quality of each image sub-region can be evaluated individually, and then the image of the first image is obtained according to the sub-region quality scores of each image sub-region
  • the quality score wherein when the image sub-regions are divided, adjacent image sub-regions have overlapping areas, which can ensure the continuity of the evaluation image content of each image sub-region, so that the image quality score of the first image can more accurately reflect the first image.
  • the image quality of an image since the sub-region quality scores of each image sub-region are determined respectively, the image quality of each image sub-region can be evaluated individually, and then the image of the first image is obtained according to the sub-region quality scores of each image sub-region
  • the quality score wherein when the image sub-regions are divided, adjacent image sub-regions have overlapping areas, which can ensure the continuity of the evaluation image content of each image sub-region, so that the image quality score of the first image can more accurately reflect the first image.
  • the accuracy of image screening can be improved, for example, images with unqualified image quality can be accurately screened out , only perform content analysis on images with qualified image quality, thereby reducing the power consumption of image content analysis, improving the efficiency of image content analysis, and improving the accuracy of image content analysis.
  • FIG. 1 is a flowchart of an image processing method provided by an embodiment of the present disclosure
  • FIG. 3 is a flowchart of some steps in another image processing method provided by an embodiment of the present disclosure.
  • FIG. 6 is a flowchart of some steps in still another image processing method provided by an embodiment of the present disclosure.
  • FIG. 9 is a flowchart of an image processing method provided by an embodiment of the present disclosure.
  • FIG. 10 is a schematic diagram of an image processing in an embodiment of the present disclosure.
  • FIG. 11 is a schematic diagram of an image area division in an embodiment of the present disclosure.
  • FIG. 13 is a structural diagram of an image processing apparatus provided by an embodiment of the present disclosure.
  • FIG. 14 is a structural diagram of an image processing apparatus provided by an embodiment of the present disclosure.
  • FIG. 15 is a structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • first, second and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and "first”, “second” distinguishes Usually it is a class, and the number of objects is not limited.
  • the first object may be one or multiple.
  • FIG. 1 is a flowchart of an image processing method provided by an embodiment of the present disclosure, as shown in FIG. 1, including the following steps:
  • the above-mentioned first image may be any frame of image obtained by decoding an image collected by a camera, and further, the above-mentioned first image may be a current image, for example, an image frame decoded and output when step 101 is executed.
  • the above-mentioned first image may be an image collected by a built-in or external camera of the electronic device. This embodiment of the present disclosure does not limit this.
  • the image may also be received through a network, and the above-mentioned decoding may be performed locally or remotely.
  • the above-mentioned division of regions may be performed according to preset division positions to obtain s regions, where s may be a preset integer greater than 1, for example: 2, 4, 6... Specifically, it can be set according to the application scenario. Certainly.
  • adjacent image sub-regions have overlapping regions.
  • the overlapping area exists in the above-mentioned adjacent image sub-areas may be, the adjacent area of the adjacent image sub-areas is an overlapping area.
  • S200 Determine the sub-region quality score of each image sub-region, where the sub-region quality score represents the image quality of the image sub-region.
  • the sub-area quality score may be calculated separately for each image sub-area, and specifically may be calculated based on the image content in each image sub-area.
  • S300 Determine an image quality score of the first image according to the sub-region quality scores of each image sub-region, where the image quality score represents the image quality of the first image.
  • the sub-region quality scores of each image sub-region may be summed to obtain the total score of the first image; or the sub-region quality scores of each image sub-region may be summed and averaged to obtain the first image sub-region quality score.
  • the total score of an image; or the quality score of each sub-region of the image can be multiplied by the corresponding weight, and then summed to obtain the total score of the first image. This embodiment of the present disclosure does not limit this.
  • the image quality of each image sub-region can be evaluated individually, and then the image quality score of the first image is obtained according to the sub-region quality scores of each image sub-region, wherein, in When the image sub-regions are divided, adjacent image sub-regions have overlapping areas, which can ensure the continuity of the evaluated image content of each image sub-region, so that the image quality score of the first image can more accurately reflect the image quality of the first image.
  • the image quality score determined through the above steps can be applied to image screening based on image quality, and can improve the accuracy of image screening. It can reduce the power consumption of image content analysis, improve the efficiency of image content analysis, and improve the accuracy of image content analysis.
  • embodiments of the present disclosure may be applied to electronic devices, such as embedded devices, mobile phones, tablet computers, wearable devices, vehicles, etc., which are not limited in the embodiments of the present disclosure.
  • determining the image quality score of the first image according to the sub-region quality scores of each image sub-region includes the following steps:
  • the position weight of each image sub-region may be preset according to the position of the image sub-region in the first image. For example, in an actual monitoring or shooting scene, the upper part of the image often corresponds to the sky or the top of the room, while the lower part of the image often corresponds to the sky or the top of the room. Corresponding to effective objects such as people or vehicles, the position weight of the upper part of the image can be set to be smaller than the position weight of the lower part of the image. This is just a simple example.
  • the position weight of each image sub-region can be specifically set according to the requirements of the application scenario.
  • the above-mentioned determination of the image quality score of the first image according to the position weight of each image sub-region and the sub-region quality score may be, weighting the sub-region quality scores of each image sub-region according to the position weight of each image sub-region, and summing, to obtain the image quality score of the first image.
  • the image quality score of the first image is determined according to the position weight of each image sub-region and the sub-region quality score, which can implement a more refined evaluation of the image quality of the first image.
  • the step of determining the image quality score of the first image according to the position weights and subregion quality scores of each image subregion determine the subregion quality score according to the subregion quality scores of each image subregion.
  • the image quality score of the first image further includes the following steps:
  • target location information represents the location of the target object in the second image determined by performing content analysis on the second image
  • the second image is an image collected before the first image
  • the target location information may be generated and sent by the device/device performing image content analysis, and the target location information may be acquired by the device/device performing image quality evaluation Receive target location information from an apparatus/equipment that performs image content analysis; when image quality evaluation and image content analysis are performed in the same apparatus/equipment, acquiring target location information may be acquiring target location information from a storage device; The location information is directly applied to the image quality evaluation process as a parameter. This embodiment of the present disclosure does not limit this.
  • the above-mentioned target object may be a preset monitored object, or an image object conforming to preset characteristics, such as a person, a vehicle, and the like.
  • the above-mentioned second image may be an image in the same video as the first image, and the second image is acquired before the first image.
  • the second image is an image of the previous frame of the first image, or the second image is an image multiple frames before the first image.
  • Determining the position weight of each image sub-region according to the target position information may be that the position weight of the image sub-region in the first image corresponding to the position of the target object in the second image is set to be greater than that of other image sub-regions in the first image. position weight. This is just a simple example.
  • the position weight of each image sub-region can be specifically set according to the requirements of the application scenario.
  • the position of the target object has a great influence on the image quality.
  • each image is determined according to the target position information.
  • the position weight of the sub-region and further determining the image quality score of the first image can improve the accuracy of the image quality evaluation.
  • determining the position weight of each image sub-region according to the target position information includes the following steps:
  • the second target image sub-region is an image sub-region other than the first target image sub-region in the first image.
  • Determining the second weight of each sub-region of the first target image may be to set the second weight of the sub-region of the first target image according to target position information generated by performing content analysis on the second image. Therefore, the second weight may also be referred to as a feedback weight.
  • S333 Determine the position weight of each first target image sub-region according to the first weight of each first target image sub-region and the second weight of each first target image sub-region.
  • Determining the position weight of the first target image sub-area according to the first weight and the second weight of the first target image sub-area may be that the position weight of the first target image sub-area is equal to the sum of the first weight and the second weight, or the The position weight of a target image sub-region is a value obtained by normalizing the sum of the first weight and the second weight.
  • S334 Determine the first weight of each second target image sub-region as the position weight of each second target image sub-region.
  • the first weight of the image sub-region represents the importance of the position of the image sub-region in the first image.
  • the first weight of each image sub-region may be preset according to the position of the image sub-region in the first image. For example, in an actual monitoring or shooting scene, the upper part of the image often corresponds to the sky or the top of the room, while the lower part of the image often corresponds to the sky or the top of the room. It corresponds to an effective object such as a person or a vehicle, so that the first weight of the upper part of the image can be set to be smaller than the first weight of the lower part of the image. This is just a simple example.
  • the first weight of each image sub-region can be specifically set according to the requirements of the application scenario.
  • the second weight is determined according to the target position information generated by the content analysis of the second image, so that the position weight of the sub-region of the first target image can more accurately characterize the sub-region of the first target image in the first image. the importance of the location in the .
  • the position weight of each image sub-region is determined according to the target position information, further comprising the following steps:
  • determining the second weight of each first target image sub-region includes the following steps:
  • the negative correlation between the second weight and the time interval between the first image and the second image may be that when the first image is closer to the second image (the interval between the first image and the second image is less or no image ), the larger the second weight is, and vice versa.
  • the time interval here may be represented by the number of image frames in the interval between the first image and the second image.
  • the negative correlation between the second weight and the time interval between the first image and the second image can be realized.
  • the second weight is negatively correlated with the time interval between the first image and the second image, so that the position weight of the sub-region of the first target image can more accurately characterize the sub-region of the first target image in the first image. the importance of the location in the .
  • determining the sub-region quality score of each image sub-region includes the following steps:
  • S210 Distinguish the image quality of the sub-regions of the image according to at least one image quality determination algorithm, and obtain initial quality scores of the sub-regions corresponding to various image quality determination algorithms.
  • the image quality determination algorithm may be at least one of Laplacian algorithm and Sobel algorithm. This is just a simple example.
  • the number and type of image quality discrimination algorithms can be set according to the requirements of the application scenario. For example, the image quality discrimination algorithm can be replaced according to the actual service, and the discrimination of more image discrimination indicators (such as brightness, color, etc.) can be added.
  • S220 Determine the sub-region quality score of the image sub-region according to the initial quality score of each sub-region.
  • Determining the sub-region quality scores of the image sub-regions according to the initial quality scores of the sub-regions may be: summing the initial quality scores of the sub-regions to obtain the sub-region quality scores of the image sub-regions; The scores are summed and averaged to obtain the sub-region quality scores of the image sub-regions; alternatively, the initial quality scores of each sub-region are weighted and then summed to obtain the sub-region quality scores of the image sub-regions. This embodiment of the present disclosure does not limit this.
  • the image quality of the image sub-regions is discriminated according to at least one image quality discriminating algorithm, which can facilitate the upgrading of the image quality discriminating algorithm, and can discriminate against various indicators through different image quality discriminating algorithms. , so that the sub-region quality score can more accurately characterize the image quality of the image sub-region.
  • the method further includes the following steps:
  • the above-mentioned preset threshold may be an experience value set by a user according to experience, or may be a threshold value learned according to an analysis result of historical image content, etc., which is not limited in this embodiment of the present disclosure.
  • the above-mentioned image quality score is less than the preset threshold value, that the quality of the first image does not meet the preset condition, or the quality of the first image is unqualified.
  • the foregoing discarding the first image may be understood as not performing a content analysis operation on the foregoing first image, for example, deleting or skipping the first image. Through step S402, it is possible to avoid invalid calculation caused by content analysis on images with unqualified quality.
  • the above-mentioned image quality score is greater than or equal to the preset threshold value, it can be understood that the quality of the first image satisfies the preset condition, or the quality of the first image is qualified.
  • the above image to be analyzed can be understood as an image for content analysis.
  • the content analysis operation is not limited, for example, the content analysis operation may be a currently existing content analysis operation or the content analysis operation may be a content analysis operation of subsequent evolution.
  • FIG. 9 is a flowchart of an image processing method provided by an embodiment of the present disclosure. As shown in FIG. 9 , the method includes the following steps:
  • the content analysis result indicates that the image to be analyzed includes the target object
  • generate target position information wherein the target position information represents the position of the target object in the image to be analyzed, and the target position information is used to determine the position of the first image.
  • the position weights of multiple image sub-regions in the first image are determined when the image quality is scored.
  • the first image is an image collected after the image to be analyzed, and adjacent image sub-regions in the multiple image sub-regions have overlapping regions.
  • the image to be analyzed is an image with an image quality score greater than a preset threshold, and the image quality score is determined through steps S100 to S300.
  • the image quality score is greater than or equal to the preset threshold, it can be understood that the quality of the image to be analyzed satisfies the preset condition, or the quality of the image to be analyzed is qualified.
  • content analysis is only performed on the images that meet the preset conditions or the quality is qualified, which can avoid the invalid calculation caused by the content analysis of the unqualified images, thereby improving the content analysis efficiency;
  • the target position information is generated when the target object is generated, which is beneficial to improve the accuracy of image screening in the process of image screening based on image quality.
  • the first image is divided into S image sub-regions, and the position weight of the image sub-regions is represented as ⁇ .
  • Preset subregions each image I s based on the importance of each sub-image regions I s position on the first image first weight (referred to as spatial or weights) ⁇ space, in the range ⁇ space may be 0 ⁇ space ⁇ 1.
  • ⁇ feedback represents the second weight (or feedback weight) of the sub-region of the first target image, which represents the influence of the position of the target object in the second image on the quality evaluation of the first image
  • the value range of ⁇ feedback can be is 0.001 ⁇ feedback ⁇ 0.5.
  • the acquisition method of ⁇ feedback can be as follows:
  • the position of the target object found in the second image is obtained from the content analysis result, and recorded as the key position; for the image sub-region in the first image corresponding to the above key position, that is For the first target image sub-region, calculate the second weight of the first target image sub-region in the current statistical period according to the exponential decay method:
  • ⁇ feedback (t) indicates that with the change of time t, the ⁇ feedback of the first target image sub-region decays with time, and the ⁇ feedback value of the first target image sub-region decays from 0.5 to 0.001 after m frames.
  • ⁇ i represents the weight of the ith image sub-region.
  • the minimum and maximum values of the second weight are set to multiple levels, and the Every time there is a frame of image between them, the value of the second weight is reduced by one level. Taking the maximum value of 0.5 and the minimum value of 0.1 as an example, when there is no interval image between the first image and the second image, the The second weight is set to 0.5, and when there is one frame of image between the first image and the second image, the second weight is set to 0.4 to decrease.
  • the second weight it is not limited that the above content analysis result indicates that the second target image sub-region of the second image includes the target object.
  • the second weights of the sub-regions of the image are all increased, otherwise, they may all be decreased, so as to increase or decrease the overall weight of the first image according to the content analysis result of the second image.
  • the above-mentioned second image may be an image in which the target object is found to exist.
  • an embodiment of the present disclosure may include a camera module, a video decoding module, a quality screening module, and a content analysis module, wherein:
  • the camera module can be built-in or external hardware that can collect images in real time;
  • the video decoding module can be used to decode the video stream from the camera module and convert it into an independent image of each frame
  • the quality screening module is used to obtain the image quality score of the image, and the quality evaluation algorithm package used can be added and modified according to business needs, and one or more different quality evaluation algorithms can be used to perform regional independent statistics on the image. , a comprehensive summary;
  • the content analysis module is used to analyze the images that the quality screening module has judged to meet the picture quality, and output the analysis results. At the same time, the content analysis module feeds back the content analysis result of the target object found to the quality screening module, such as the region where the target object is located, and the quality screening module performs exponential attenuation of the image quality of the region within a certain subsequent frame interval. weighted.
  • the position weight of the image sub-region can be made more accurate through the feedback of the content analysis module.
  • the second weight may not be set, that is, only the first weight may be set. For example, if there is no target object in the multiple frames before the first image, the second weight may not be set.
  • the above calculation of the sub-region quality score of each image sub-region includes: for each image sub-region, using one or more image quality discrimination algorithms to discriminate the image quality of the image sub-region , get the sub-region quality score of the image sub-region.
  • each image quality judging algorithm can set a corresponding weight.
  • Q s represents the quality score of a certain image sub-region
  • f j ( ) represents the initial quality score of the sub-region corresponding to the image quality discrimination algorithm
  • ⁇ j represents the weight corresponding to the image quality discrimination algorithm
  • the image quality determination algorithm includes, but is not limited to, the Laplacian algorithm and the Sobel algorithm.
  • the image quality of the image sub-regions is discriminated according to at least one image quality discriminating algorithm, which can facilitate the upgrading of the image quality discriminating algorithm, and can discriminate against various indicators through different image quality discriminating algorithms, so that the The sub-region quality score can more accurately characterize the image quality of an image sub-region.
  • the image quality discrimination algorithm for calculating the sub-region quality score of the sub-region of the image can also be modified or replaced according to the actual business requirements or the type of the image, so as to facilitate the realization of the premise of not changing the hardware of the electronic device in the later stage.
  • the discrimination of more picture discrimination indicators (such as brightness, color, etc.) is added.
  • the image quality of each image sub-region can be evaluated individually, and then the image of the first image is obtained according to the sub-region quality scores of each image sub-region
  • the quality score enables the image quality score of the first image to more accurately reflect the image quality of the first image.
  • Image quality scoring can be applied to image screening based on image quality, and can improve the accuracy of image screening. For example, images with unqualified image quality are filtered out, and content analysis is performed only on images with acceptable image quality, which can reduce the image content. The power consumption of analysis improves the efficiency of image content analysis.
  • FIG. 12 is a flowchart of another image processing method provided by the implementation of the present disclosure, as shown in FIG. 12, including the following steps:
  • decoding and image preprocessing are carried out to the video from the camera hardware of the electronic device, and the image I is obtained in a loop;
  • S602 Divide the I image into regions to obtain a total of s image sub-regions, and the resolution of each image sub-region is u ⁇ v.
  • the adjacent image sub-regions in the s image sub-regions have overlapping regions.
  • the first weight (or spatial weight) ⁇ space is preset according to the positions of different image sub-regions in the image.
  • the spatial weight ⁇ space can be determined according to business needs.
  • the quality screening module shown in Figure 10 receives the target position information fed back by the subsequent content analysis module, such as the target position information of the target region of interest (ROI, Region Of Interest) obtained by the subsequent Yolo algorithm, and then uses the exponential decay method to obtain the first
  • the position weight ⁇ of each image sub-region is normalized, and the sum of the position weights of each image sub-region is equal to 1.
  • the sub-region quality score Q s ⁇ 1 ⁇ f 1 ( ⁇ )+ ⁇ 2 ⁇ f 2 ( ⁇ ) is obtained.
  • the sub-region quality scores of the sub-regions of the image may be multiplied by the corresponding position weights, and then summed.
  • This step may be to determine whether the frame of image enters the subsequent content analysis link according to the final image quality score Q Total, which may be specifically as follows:
  • T Threshold represents a preset threshold.
  • FIG. 13 is a structural diagram of an image processing apparatus provided by an embodiment of the present disclosure. As shown in FIG. 13, the image processing apparatus 100 includes:
  • the dividing module 101 is configured to divide the first image into regions to obtain a plurality of image sub-regions, wherein adjacent image sub-regions in the plurality of image sub-regions have overlapping regions;
  • the calculation module 102 is used to determine the sub-region quality score of each image sub-region, and the sub-region quality score represents the image quality of the image sub-region;
  • the acquiring module 103 is configured to determine the image quality score of the first image according to the sub-region quality scores of each image sub-region, where the image quality score represents the image quality of the first image.
  • the obtaining module 103 includes:
  • the image quality score obtaining unit is used for weighting the sub-region quality scores of each image sub-region according to the position weight of each image sub-region, and summing them up to obtain the image quality score of the first image, wherein the position weight of the image sub-region is Characterizes the importance of the position of the image sub-region in the first image.
  • the obtaining module 103 further includes:
  • the position weight determination unit is used for acquiring target position information, the target position information representing the position of the target object in the second image determined by performing content analysis on the second image, and the second image is an image collected before the first image.
  • the position weight determination unit is further configured to determine the position weight of each image sub-region according to the target position information.
  • the position weight determination unit is configured to divide the plurality of image sub-regions into at least one first target image sub-region and at least one second target image sub-region according to the target position information, and the first target image sub-region A region is an image sub-region in the first image that corresponds to the position of the target object in the second image.
  • the position weight determination unit is further configured to determine a second weight of each of the first target image sub-areas, where the second weight of the first target image sub-area represents the possibility that the first target image sub-area includes a target object.
  • the position weight determination unit is further configured to determine the position weight of each first target image sub-region according to the first weight of each first target image sub-region and the second weight of each first target image sub-region.
  • the position weight determination unit is further configured to determine the first weight of each second target image sub-region as the position weight of each second target image sub-region.
  • the first weight of the image sub-region represents the importance of the position of the image sub-region in the first image.
  • the position weight determination unit is further configured to perform normalization processing on the position weights of each image sub-region, so that the sum of the position weights of each image sub-region is equal to 1.
  • the position weight determination unit is further configured to determine the second weight of each sub-region of the first target image according to the time interval between the first image and the second image.
  • the two weights are negatively related to the time interval between the first image and the second image.
  • the computing module 102 includes:
  • the sub-region quality judging unit is used for judging the image quality of the image sub-regions according to at least one image quality judging algorithm, and obtaining the sub-region quality initial scores corresponding to various image quality judging algorithms.
  • the sub-region quality scoring unit is configured to determine the sub-region quality scores of the image sub-regions according to the initial quality scores of each sub-region.
  • the image processing apparatus further includes a screening module.
  • the screening module is used to judge whether the image quality score is less than the preset threshold; in the case of the image quality score less than the preset threshold, discard the first image; in the case of the image quality score greater than or equal to the preset threshold, use the first image as the image to be analyzed.
  • FIG. 14 is a structural diagram of an image processing apparatus provided by an embodiment of the present disclosure. As shown in FIG. 14, the image processing apparatus 200 includes:
  • An analysis module 201 configured to perform content analysis on the image to be analyzed to obtain a content analysis result
  • the feedback module 202 is configured to generate target position information when the content analysis result indicates that the target object is included in the image to be analyzed, wherein the target position information represents the position of the target object in the image to be analyzed, and the target position information is used to determine the target position.
  • the position weights of multiple image sub-regions in the first image are determined when the image quality of the first image is scored, the first image is an image collected after the image to be analyzed, and adjacent image sub-regions in the multiple image sub-regions overlap area.
  • the image processing apparatus in the embodiments of the present disclosure may be an apparatus, and may also be a component, an integrated circuit, or a chip in an electronic device.
  • FIG. 15 is a structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • the electronic device 300 includes: a memory 301 , a processor 302 , and a memory 301 and a processor 302
  • a program or instruction running on the processor 302 implements the steps in the above image processing method when the program or instruction is executed by the processor 302 .
  • Embodiments of the present disclosure further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium.
  • a program or an instruction is stored on the readable storage medium.
  • the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation.
  • the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
  • a storage medium such as ROM/RAM, magnetic disk, CD-ROM

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The present invention provides an image processing method, comprising: performing area division on a first image to obtain a plurality of image subareas, wherein an overlapping area exists between adjacent image subareas in the plurality of image subareas; determining subarea quality scores of the image subareas, the subarea quality scores representing the image quality of the image subareas; and according to the subarea quality scores of the image subareas, determining an image quality score of the first image, the image quality score representing the image quality of the first image. The present invention further provides an image processing method, an image processing apparatus, an electronic device, and a readable storage medium.

Description

图像处理方法及装置、电子设备、存储介质Image processing method and device, electronic device, storage medium 技术领域technical field
本公开涉及图像处理技术领域,尤其涉及一种图像处理方法、一种图像处理装置、一种电子设备、一种可读存储介质。The present disclosure relates to the technical field of image processing, and in particular, to an image processing method, an image processing apparatus, an electronic device, and a readable storage medium.
背景技术Background technique
图像内容分析是一种常见的图像处理技术。图像内容分析的主要过程是从摄像头获取视频图像,对视频图像进行解码,之后对解码每幅图像进行内容分析。Image content analysis is a common image processing technique. The main process of image content analysis is to obtain video images from the camera, decode the video images, and then perform content analysis on each decoded image.
一些相关技术中,在进行图像内容分析时,需要先对图像质量进行评价、然后对图像评价质量较高的图像进行内容分析。如图像质量评价不准确,将降低对图像进行内容分析的准确程度、并且还有可能会降低对图像进行内容分析的效率。由此可知,对于对图像进行内容分析而言,图像质量评价的准确程度是一个关键的因素。In some related technologies, when performing image content analysis, it is necessary to evaluate the image quality first, and then perform content analysis for images with higher image evaluation quality. If the image quality evaluation is inaccurate, the accuracy of the content analysis of the image will be reduced, and the efficiency of the content analysis of the image may also be reduced. It can be seen that the accuracy of image quality evaluation is a key factor for the content analysis of images.
如何提高图像质量评价的准确程度成为本领域所追求的。How to improve the accuracy of image quality evaluation has become the pursuit of this field.
发明内容SUMMARY OF THE INVENTION
本公开实施例提供一种图像处理方法、一种图像处理装置、一种电子设备、一种可读存储介质。Embodiments of the present disclosure provide an image processing method, an image processing apparatus, an electronic device, and a readable storage medium.
第一方面,本公开实施例提供一种图像处理方法,包括:In a first aspect, an embodiment of the present disclosure provides an image processing method, including:
将第一图像进行区域划分,得到多个图像子区域,其中,多个所述图像子区域中相邻的图像子区域存在重叠区域;Dividing the first image into regions to obtain a plurality of image sub-regions, wherein adjacent image sub-regions in the plurality of image sub-regions have overlapping regions;
确定各个所述图像子区域的子区域质量评分,所述子区域质量评分表征所述图像子区域的图像质量;determining a sub-region quality score of each of the image sub-regions, the sub-region quality score representing the image quality of the image sub-region;
根据各个所述图像子区域的子区域质量评分确定所述第一图像的图像质量评分,所述图像质量评分表征所述第一图像的图像质量。The image quality score of the first image is determined according to the sub-region quality score of each of the image sub-regions, and the image quality score represents the image quality of the first image.
第二方面,本公开实施例提供一种图像处理方法,包括:In a second aspect, an embodiment of the present disclosure provides an image processing method, including:
对待分析图像进行内容分析,得到内容分析结果;Perform content analysis on the image to be analyzed to obtain content analysis results;
在所述内容分析结果表明所述待分析图像中包括目标对象的情况下,生成目标位置信息,其中,所述目标位置信息表征所述目标对象在所述待分析图像中的位置,所述目标位置信息用于在确定第一图像的图像质量评分时确定所述第一图像中的多个图像子区域的位置权重,所述第一图像为在所述待分析图像之后采集的图像,多个所述图像子区域中相邻的图像子区域存在重叠区域。When the content analysis result indicates that the image to be analyzed includes a target object, target position information is generated, wherein the target position information represents the position of the target object in the image to be analyzed, and the target The location information is used to determine the location weights of multiple image sub-regions in the first image when determining the image quality score of the first image, where the first image is an image collected after the image to be analyzed, and multiple The adjacent image sub-regions in the image sub-regions have overlapping regions.
第三方面,本公开实施例提供一种图像处理装置,包括:In a third aspect, embodiments of the present disclosure provide an image processing apparatus, including:
划分模块,用于将第一图像进行区域划分,得到多个图像子区域,其中,多个所述图像子区域中相邻的图像子区域存在重叠区域;a dividing module, configured to divide the first image into regions to obtain a plurality of image sub-regions, wherein adjacent image sub-regions in the plurality of image sub-regions have overlapping regions;
计算模块,用于确定各个所述图像子区域的子区域质量评分,所述子区域质量评分表征所述图像子区域的图像质量;a calculation module, configured to determine a sub-region quality score of each of the image sub-regions, where the sub-region quality score represents the image quality of the image sub-region;
获取模块,用于根据各个所述图像子区域的子区域质量评分确定所述第一图像的图像质量评分,所述图像质量评分表征所述第一图像的图像质量。An acquisition module, configured to determine an image quality score of the first image according to the sub-region quality scores of each of the image sub-regions, where the image quality score represents the image quality of the first image.
第四方面,本公开实施例提供一种图像处理装置,包括:In a fourth aspect, embodiments of the present disclosure provide an image processing apparatus, including:
分析模块,用于对待分析图像进行内容分析,得到内容分析结果;The analysis module is used to analyze the content of the image to be analyzed, and obtain the content analysis result;
反馈模块,用于在所述内容分析结果表明所述待分析图像中包括目标对象的情况下,生成目标位置信息,其中,所述目标位置信息表征所述目标对象在所述待分析图像中的位置,所述目标位置信息用于在确定第一图像的图像质量评分时确定所述第一图像中的多个图像子区域的位置权重,所述第一图像为在所述待分析图像之后采集的图像,多个所述图像子区域中相邻的图像子区域存在重叠区域。The feedback module is configured to generate target position information when the content analysis result indicates that the image to be analyzed includes a target object, wherein the target position information represents the position of the target object in the image to be analyzed. position, the target position information is used to determine the position weight of a plurality of image sub-regions in the first image when the image quality score of the first image is determined, and the first image is collected after the image to be analyzed image, and adjacent image sub-regions among the plurality of image sub-regions have overlapping regions.
第五方面,本公开实施例提供一种电子设备,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的程序或者指令,所述程序或者指令被所述处理器执行时实现以下方法中的至少一种:In a fifth aspect, an embodiment of the present disclosure provides an electronic device, including: a memory, a processor, and a program or instruction stored on the memory and executable on the processor, where the program or instruction is processed by the processor implements at least one of the following methods when executing:
本公开实施例第一方面提供的任意一种图像处理方法;Any image processing method provided by the first aspect of the embodiments of the present disclosure;
本公开实施例第二方面提供的任意一种图像处理方法。Any image processing method provided by the second aspect of the embodiments of the present disclosure.
第六方面,本公开实施例提供一种可读存储介质,所述可读存储介质上存储有程序或指令,所述程序或指令被处理器执行时实现以下方法中的至少一种:In a sixth aspect, an embodiment of the present disclosure provides a readable storage medium, where a program or an instruction is stored thereon, and when the program or instruction is executed by a processor, at least one of the following methods is implemented:
本公开实施例第一方面提供的任意一种图像处理方法;Any image processing method provided by the first aspect of the embodiments of the present disclosure;
本公开实施例第二方面提供的任意一种图像处理方法。Any image processing method provided by the second aspect of the embodiments of the present disclosure.
本公开实施例中,由于先分别确定各个图像子区域的子区域质量评分,能够对各个图像子区域的图像质量单独进行评价,然后依据各个图像子区域的子区域质量评分获取第一图像的图像质量评分,其中,在划分图像子区域时相邻的图像子区域存在重叠区域,可以保证各图像子区域的评估图像内容的连续性,使得对第一图像的图像质量评分能够更加准确地反映第一图像的图像质量。In the embodiment of the present disclosure, since the sub-region quality scores of each image sub-region are determined respectively, the image quality of each image sub-region can be evaluated individually, and then the image of the first image is obtained according to the sub-region quality scores of each image sub-region The quality score, wherein when the image sub-regions are divided, adjacent image sub-regions have overlapping areas, which can ensure the continuity of the evaluation image content of each image sub-region, so that the image quality score of the first image can more accurately reflect the first image. The image quality of an image.
将本公开第一个方面所提供的图像处理方法中获得的图像质量评分应用于基于图像质量的图像筛选时,可以提升图像筛选的准确度,例如,准确地将图像质量不合格的图像筛除,只对图像质量合格的图像进行内容分析,从而可以降低图像内容分析的功耗,提升图像内容分析的效率、并提升了对图像内容进行分析时的准确程度。When the image quality score obtained in the image processing method provided by the first aspect of the present disclosure is applied to image screening based on image quality, the accuracy of image screening can be improved, for example, images with unqualified image quality can be accurately screened out , only perform content analysis on images with qualified image quality, thereby reducing the power consumption of image content analysis, improving the efficiency of image content analysis, and improving the accuracy of image content analysis.
附图说明Description of drawings
图1是本公开实施例提供的一种图像处理方法的流程图;1 is a flowchart of an image processing method provided by an embodiment of the present disclosure;
图2是本公开实施例提供的另一种图像处理方法中部分步骤的流程图;2 is a flowchart of some steps in another image processing method provided by an embodiment of the present disclosure;
图3是本公开实施例提供的又一种图像处理方法中部分步骤的流程图;3 is a flowchart of some steps in another image processing method provided by an embodiment of the present disclosure;
图4是本公开实施例提供的再一种图像处理方法中部分步骤的流程图;4 is a flowchart of some steps in still another image processing method provided by an embodiment of the present disclosure;
图5是本公开实施例提供的再一种图像处理方法中部分步骤的流程图;5 is a flowchart of some steps in still another image processing method provided by an embodiment of the present disclosure;
图6是本公开实施例提供的再一种图像处理方法中部分步骤的流程图;6 is a flowchart of some steps in still another image processing method provided by an embodiment of the present disclosure;
图7是本公开实施例提供的再一种图像处理方法中部分步骤的流程图;7 is a flowchart of some steps in still another image processing method provided by an embodiment of the present disclosure;
图8是本公开实施例提供的再一种图像处理方法中部分步骤的流程图;8 is a flowchart of some steps in still another image processing method provided by an embodiment of the present disclosure;
图9是本公开实施例提供的一种图像处理方法的流程图;9 is a flowchart of an image processing method provided by an embodiment of the present disclosure;
图10是本公开实施例中一种图像处理的示意图;10 is a schematic diagram of an image processing in an embodiment of the present disclosure;
图11是本公开实施例中一种图像区域划分的示意图;11 is a schematic diagram of an image area division in an embodiment of the present disclosure;
图12是本公开实施例提供的一种图像处理方法的流程图;12 is a flowchart of an image processing method provided by an embodiment of the present disclosure;
图13是本公开实施例提供的一种图像处理装置的结构图;13 is a structural diagram of an image processing apparatus provided by an embodiment of the present disclosure;
图14是本公开实施例提供的一种图像处理装置的结构图;14 is a structural diagram of an image processing apparatus provided by an embodiment of the present disclosure;
图15是本公开实施例提供的一种电子设备的结构图。FIG. 15 is a structural diagram of an electronic device provided by an embodiment of the present disclosure.
具体实施方式detailed description
下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”所区别的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and "first", "second" distinguishes Usually it is a class, and the number of objects is not limited. For example, the first object may be one or multiple.
参见图1,图1是本公开实施例提供的一种图像处理方法的流程图,如图1所示,包括以下步骤:Referring to FIG. 1, FIG. 1 is a flowchart of an image processing method provided by an embodiment of the present disclosure, as shown in FIG. 1, including the following steps:
S100、将第一图像进行区域划分,得到多个图像子区域,其中,多个图像子区域中相邻的图像子区域存在重叠区域。S100. Divide the first image into regions to obtain multiple image sub-regions, wherein adjacent image sub-regions among the multiple image sub-regions have overlapping regions.
其中,上述第一图像可以是摄像头采集的图像经过解码获取的任一帧图像,进一步的,上述第一图像可以是当前图像,例如:执行步骤101时解码输出的图像帧。另外,上述第一图像可以是电子设备的内置或者外置摄像头采集的图像。本公开实施例对此不作限定,例如:还可以是通过网络接收到图像,且上述解码可以是本地或者远端执行的解码。Wherein, the above-mentioned first image may be any frame of image obtained by decoding an image collected by a camera, and further, the above-mentioned first image may be a current image, for example, an image frame decoded and output when step 101 is executed. In addition, the above-mentioned first image may be an image collected by a built-in or external camera of the electronic device. This embodiment of the present disclosure does not limit this. For example, the image may also be received through a network, and the above-mentioned decoding may be performed locally or remotely.
上述进行区域划分可以是按照预先设置的划分位置进行划分,以得到s个区域,其中,s可以为预先设置的大于1的整数,例如:2、4、6……具体可以根据应用场景进行设定。The above-mentioned division of regions may be performed according to preset division positions to obtain s regions, where s may be a preset integer greater than 1, for example: 2, 4, 6... Specifically, it can be set according to the application scenario. Certainly.
上述s个图像子区域中相邻图像子区域存在重叠区域。In the above-mentioned s image sub-regions, adjacent image sub-regions have overlapping regions.
上述相邻图像子区域存在重叠区域可以是,相邻图像子区域的相邻区域为重叠区域。The overlapping area exists in the above-mentioned adjacent image sub-areas may be, the adjacent area of the adjacent image sub-areas is an overlapping area.
例如:以上述s为4举例,假设来自视频解码后的第一图像为I,对I进行m行n列的子区域分割。分割后共有s=m×n个图像子区域,各图像子区域之间有t个像素宽宽度的重叠。参数m、n和t均为根据实际业务需要预设的值,其中,分 割后的图像子区域重叠情况如图11所示。For example, taking the above s as 4 as an example, assuming that the first image from the decoded video is I, perform sub-region segmentation of m rows and n columns for I. After the division, there are s=m×n image sub-regions in total, and each image sub-region overlaps with a width of t pixels. The parameters m, n and t are all preset values according to actual service requirements, and the overlapping situation of the divided image sub-regions is shown in Figure 11.
由于相邻图像子区域存在重叠区域,确定各个图像子区域的子区域质量评分时,可以保证各图像子区域的评估图像内容的连续性,避免同一物体被划分到不同的图像子区域而导致的偏差,使得根据各个图像子区域的子区域质量评分确定的图像质量评分能够更加准确地反映图像质量。Since there are overlapping areas in adjacent image sub-areas, when determining the sub-area quality score of each image sub-area, it can ensure the continuity of the evaluated image content of each image sub-area, and avoid the same object being divided into different image sub-areas. deviation, so that the image quality score determined according to the sub-region quality score of each image sub-region can more accurately reflect the image quality.
S200、确定各个图像子区域的子区域质量评分,子区域质量评分表征图像子区域的图像质量。S200. Determine the sub-region quality score of each image sub-region, where the sub-region quality score represents the image quality of the image sub-region.
该步骤可以是针对每个图像子区域单独计算子区域质量评分,具体可以是基于每个图像子区域中的图像内容进行计算。In this step, the sub-area quality score may be calculated separately for each image sub-area, and specifically may be calculated based on the image content in each image sub-area.
S300、根据各个图像子区域的子区域质量评分确定第一图像的图像质量评分,图像质量评分表征第一图像的图像质量。S300. Determine an image quality score of the first image according to the sub-region quality scores of each image sub-region, where the image quality score represents the image quality of the first image.
该步骤可以是将各图像子区域的子区域质量评分进行求和,以得到第一图像的总评分;或者可以是将各图像子区域的子区域质量评分进行求和后求平均,以得到第一图像的总评分;或者可以是将各图像子区域的质量评分乘上对应的权重,再求和,以得到第一图像的总评分。本公开实施例对此不做限定。In this step, the sub-region quality scores of each image sub-region may be summed to obtain the total score of the first image; or the sub-region quality scores of each image sub-region may be summed and averaged to obtain the first image sub-region quality score. The total score of an image; or the quality score of each sub-region of the image can be multiplied by the corresponding weight, and then summed to obtain the total score of the first image. This embodiment of the present disclosure does not limit this.
由于先分别确定各个图像子区域的子区域质量评分,能够对各个图像子区域的图像质量单独进行评价,然后依据各个图像子区域的子区域质量评分获取第一图像的图像质量评分,其中,在划分图像子区域时相邻的图像子区域存在重叠区域,可以保证各图像子区域的评估图像内容的连续性,使得对第一图像的图像质量评分能够更加准确地反映第一图像的图像质量。Since the sub-region quality scores of each image sub-region are determined separately, the image quality of each image sub-region can be evaluated individually, and then the image quality score of the first image is obtained according to the sub-region quality scores of each image sub-region, wherein, in When the image sub-regions are divided, adjacent image sub-regions have overlapping areas, which can ensure the continuity of the evaluated image content of each image sub-region, so that the image quality score of the first image can more accurately reflect the image quality of the first image.
本公开实施例中,通过上述步骤确定的图像质量评分能够应用于基于图像质量的图像筛选,并能够提升图像筛选的准确度,例如,将图像质量不合格的图像筛除,只对图像质量合格的图像进行内容分析,从而可以降低图像内容分析的功耗,提升图像内容分析的效率、并提升了对图像内容分析时的准确程度。In the embodiment of the present disclosure, the image quality score determined through the above steps can be applied to image screening based on image quality, and can improve the accuracy of image screening. It can reduce the power consumption of image content analysis, improve the efficiency of image content analysis, and improve the accuracy of image content analysis.
需要说明的是,本公开实施例可以应用于电子设备,如嵌入式设备、手机、平板电脑、穿戴设备、车辆等,本公开实施例对此不作限定。It should be noted that the embodiments of the present disclosure may be applied to electronic devices, such as embedded devices, mobile phones, tablet computers, wearable devices, vehicles, etc., which are not limited in the embodiments of the present disclosure.
作为一种可选的实施方式,参照图2,根据各个图像子区域的子区域质量评分确定第一图像的图像质量评分,包括以下步骤:As an optional implementation manner, referring to FIG. 2 , determining the image quality score of the first image according to the sub-region quality scores of each image sub-region includes the following steps:
S310、根据各个图像子区域的位置权重对各个图像子区域的子区域质量评分进行加权,并求和,得到第一图像的图像质量评分,其中,图像子区域的位置权重表征图像子区域在第一图像中的位置的重要程度。S310, weighting the sub-region quality scores of each image sub-region according to the position weight of each image sub-region, and summing them to obtain the image quality score of the first image, wherein the position weight of the image sub-region indicates that the image sub-region is in the first image sub-region The importance of a location in an image.
各个图像子区域的位置权重可以是依据图像子区域在第一图像中的位置预先设置的,例如:在实际监控或者拍摄场景,图像的上部往往是对应天空或者房间顶部,而图像的下部往往是对应人物或者车辆等有效物体,从而可以将图像的上部的位置权重设置为小于图像的下部的位置权重。这仅是简单的举例。各个图像子区域的位置权重具体可以根据应用场景的需求进行设定。The position weight of each image sub-region may be preset according to the position of the image sub-region in the first image. For example, in an actual monitoring or shooting scene, the upper part of the image often corresponds to the sky or the top of the room, while the lower part of the image often corresponds to the sky or the top of the room. Corresponding to effective objects such as people or vehicles, the position weight of the upper part of the image can be set to be smaller than the position weight of the lower part of the image. This is just a simple example. The position weight of each image sub-region can be specifically set according to the requirements of the application scenario.
上述根据各个图像子区域的位置权重和子区域质量评分,确定第一图像的图像 质量评分可以是,依据各个图像子区域的位置权重对各个图像子区域的子区域质量评分进行加权,并求和,以得到第一图像的图像质量评分。本公开实施例中,位置权重越大,表示图像子区域在第一图像中的位置越重要。The above-mentioned determination of the image quality score of the first image according to the position weight of each image sub-region and the sub-region quality score may be, weighting the sub-region quality scores of each image sub-region according to the position weight of each image sub-region, and summing, to obtain the image quality score of the first image. In the embodiment of the present disclosure, the larger the position weight is, the more important the position of the image sub-region in the first image is.
在本公开实施例中,根据各个图像子区域的位置权重和子区域质量评分,确定第一图像的图像质量评分,能够对第一图像的图像质量实现更加精细化的评价。In the embodiment of the present disclosure, the image quality score of the first image is determined according to the position weight of each image sub-region and the sub-region quality score, which can implement a more refined evaluation of the image quality of the first image.
作为一种可选的实施方式,参照图3,在根据各个图像子区域的位置权重和子区域质量评分,确定第一图像的图像质量评分的步骤之前,根据各个图像子区域的子区域质量评分确定第一图像的图像质量评分,还包括以下步骤:As an optional implementation manner, referring to FIG. 3 , before the step of determining the image quality score of the first image according to the position weights and subregion quality scores of each image subregion, determine the subregion quality score according to the subregion quality scores of each image subregion. The image quality score of the first image further includes the following steps:
S320、获取目标位置信息,目标位置信息表征对第二图像进行内容分析所确定的目标对象在第二图像中的位置,第二图像为在第一图像之前采集的图像。S320. Obtain target location information, where the target location information represents the location of the target object in the second image determined by performing content analysis on the second image, and the second image is an image collected before the first image.
在图像质量评价与图像内容分析在不同装置/设备中执行时,目标位置信息可以是由执行图像内容分析的装置/设备生成并发送的,获取目标位置信息可以是执行图像质量评价的装置/设备从执行图像内容分析的装置/设备接收目标位置信息;在图像质量评价与图像内容分析在相同装置/设备中执行时,获取目标位置信息可以是从存储设备中获取目标位置信息;也可以是目标位置信息作为参数直接应用到图像质量评价过程中。本公开实施例对此不做限定。When image quality evaluation and image content analysis are performed in different devices/equipment, the target location information may be generated and sent by the device/device performing image content analysis, and the target location information may be acquired by the device/device performing image quality evaluation Receive target location information from an apparatus/equipment that performs image content analysis; when image quality evaluation and image content analysis are performed in the same apparatus/equipment, acquiring target location information may be acquiring target location information from a storage device; The location information is directly applied to the image quality evaluation process as a parameter. This embodiment of the present disclosure does not limit this.
上述目标对象可以是预先设定的被监控对象,或者符合预设特征的图像对象,如人物、车辆等等。The above-mentioned target object may be a preset monitored object, or an image object conforming to preset characteristics, such as a person, a vehicle, and the like.
上述第二图像可以是与第一图像为同一视频中的图像,且第二图像在第一图像之前采集。例如:第二图像是第一图像的前一帧图像,或者第二图像是第一图像多帧之前的图像。The above-mentioned second image may be an image in the same video as the first image, and the second image is acquired before the first image. For example, the second image is an image of the previous frame of the first image, or the second image is an image multiple frames before the first image.
S330、根据目标位置信息确定各个图像子区域的位置权重。S330. Determine the position weight of each image sub-region according to the target position information.
根据目标位置信息确定各个图像子区域的位置权重可以是,第一图像中与目标对象在第二图像中的位置相对应的图像子区域的位置权重设置为大于第一图像中其他图像子区域的位置权重。这仅是简单的举例。各个图像子区域的位置权重具体可以根据应用场景的需求进行设定。Determining the position weight of each image sub-region according to the target position information may be that the position weight of the image sub-region in the first image corresponding to the position of the target object in the second image is set to be greater than that of other image sub-regions in the first image. position weight. This is just a simple example. The position weight of each image sub-region can be specifically set according to the requirements of the application scenario.
在图像质量评价过程中,包括目标对象的位置对图像质量的影响较大,在通过内容分析确定了目标对象在第一图像之前的图像帧中的位置的基础上,根据目标位置信息确定各个图像子区域的位置权重,并进一步确定第一图像的图像质量评分,能够提升图像质量评价的准确性。In the process of image quality evaluation, the position of the target object has a great influence on the image quality. On the basis of determining the position of the target object in the image frame before the first image through content analysis, each image is determined according to the target position information. The position weight of the sub-region and further determining the image quality score of the first image can improve the accuracy of the image quality evaluation.
作为一种可选的实施方式,参照图4,根据目标位置信息确定各个图像子区域的位置权重,包括以下步骤:As an optional implementation manner, referring to FIG. 4 , determining the position weight of each image sub-region according to the target position information includes the following steps:
S331、根据目标位置信息将多个图像子区域划分为至少一个第一目标图像子区域和至少一个第二目标图像子区域,第一目标图像子区域为在第一图像中与目标对象在第二图像中的位置相对应的图像子区域。S331. Divide the plurality of image sub-areas into at least one first target image sub-area and at least one second target image sub-area according to the target position information, where the first target image sub-area is the same as the target object in the first image and the second target image sub-area. The subregion of the image corresponding to the location in the image.
第二目标图像子区域为在第一图像中除第一目标图像子区域以外的图像子区域。The second target image sub-region is an image sub-region other than the first target image sub-region in the first image.
S332、确定各个第一目标图像子区域的第二权重,第一目标图像子区域的第二权重表征第一目标图像子区域中包括目标对象的可能性。S332. Determine the second weight of each first target image sub-region, where the second weight of the first target image sub-region represents the possibility that the first target image sub-region includes the target object.
确定各个第一目标图像子区域的第二权重可以是,根据对第二图像进行内容分析生成的目标位置信息设置第一目标图像子区域的第二权重。因此,第二权重也可以称作反馈权重。Determining the second weight of each sub-region of the first target image may be to set the second weight of the sub-region of the first target image according to target position information generated by performing content analysis on the second image. Therefore, the second weight may also be referred to as a feedback weight.
S333、根据各个第一目标图像子区域的第一权重和各个第一目标图像子区域的第二权重,确定各个第一目标图像子区域的位置权重。S333. Determine the position weight of each first target image sub-region according to the first weight of each first target image sub-region and the second weight of each first target image sub-region.
根据第一目标图像子区域的第一权重和第二权重确定第一目标图像子区域的位置权重可以是,第一目标图像子区域的位置权重等于第一权重和第二权重之和,或者第一目标图像子区域的位置权重是对第一权重和第二权重之和进行归一化处理得到的取值。Determining the position weight of the first target image sub-area according to the first weight and the second weight of the first target image sub-area may be that the position weight of the first target image sub-area is equal to the sum of the first weight and the second weight, or the The position weight of a target image sub-region is a value obtained by normalizing the sum of the first weight and the second weight.
S334、将各个第二目标图像子区域的第一权重确定为各个第二目标图像子区域的位置权重。S334: Determine the first weight of each second target image sub-region as the position weight of each second target image sub-region.
其中,图像子区域的第一权重表征图像子区域在第一图像中的位置的重要程度。The first weight of the image sub-region represents the importance of the position of the image sub-region in the first image.
各个图像子区域的第一权重可以是依据图像子区域在第一图像中的位置预先设置的,例如:在实际监控或者拍摄场景,图像的上部往往是对应天空或者房间顶部,而图像的下部往往是对应人物或者车辆等有效物体,从而可以将图像的上部的第一权重设置为小于图像的下部的第一权重。这仅是简单的举例。各个图像子区域的第一权重具体可以根据应用场景的需求进行设定。The first weight of each image sub-region may be preset according to the position of the image sub-region in the first image. For example, in an actual monitoring or shooting scene, the upper part of the image often corresponds to the sky or the top of the room, while the lower part of the image often corresponds to the sky or the top of the room. It corresponds to an effective object such as a person or a vehicle, so that the first weight of the upper part of the image can be set to be smaller than the first weight of the lower part of the image. This is just a simple example. The first weight of each image sub-region can be specifically set according to the requirements of the application scenario.
该实施方式中,第二权重是根据对第二图像进行内容分析生成的目标位置信息确定的,能够使得第一目标图像子区域的位置权重更加准确地表征第一目标图像子区域在第一图像中的位置的重要程度。In this embodiment, the second weight is determined according to the target position information generated by the content analysis of the second image, so that the position weight of the sub-region of the first target image can more accurately characterize the sub-region of the first target image in the first image. the importance of the location in the .
作为一种可选的实施方式,参照图5,根据目标位置信息确定各个图像子区域的位置权重,还包括以下步骤:As an optional implementation manner, referring to FIG. 5 , the position weight of each image sub-region is determined according to the target position information, further comprising the following steps:
S335、对各个图像子区域的位置权重进行归一化处理,以使各个图像子区域的位置权重的和等于1。S335 , normalize the position weights of each image sub-region, so that the sum of the position weights of each image sub-region is equal to 1.
作为一种可选的实施方式,参照图6,确定各个第一目标图像子区域的第二权重,包括以下步骤:As an optional implementation manner, referring to FIG. 6 , determining the second weight of each first target image sub-region includes the following steps:
S3321、根据第一图像与第二图像之间的时间间隔确定各个第一目标图像子区域的第二权重,第一目标图像子区域的第二权重与第一图像与第二图像之间的时间间隔负相关。S3321. Determine the second weight of each first target image sub-region according to the time interval between the first image and the second image, the second weight of the first target image sub-region and the time between the first image and the second image Intervals are negatively correlated.
上述第二权重与第一图像与第二图像之间的时间间隔负相关可以是,当第一图像离上述第二图像越近(第一图像与第二图像之间的间隔图像越少或者没有)时,上述第二权重越大,反之越小。这里的时间间隔可以是通过第一图像与第二图像之间的间隔图像帧数表示。第二权重与第一图像与第二图像之间的时间间隔负相关可以实现,当第一图像离上述第二图像越近,目标对象在第一目标子区域中的可能性越大,将第一目标子区域的第二权重设置得越大,表示第一目标子区域越重要。The negative correlation between the second weight and the time interval between the first image and the second image may be that when the first image is closer to the second image (the interval between the first image and the second image is less or no image ), the larger the second weight is, and vice versa. The time interval here may be represented by the number of image frames in the interval between the first image and the second image. The negative correlation between the second weight and the time interval between the first image and the second image can be realized. When the first image is closer to the second image, the more likely the target object is in the first target sub-area, the more likely the target object is in the first target sub-region. The larger the second weight of a target sub-region is set, the more important the first target sub-region is.
在本实施例中,第二权重与第一图像与第二图像之间的时间间隔负相关,能够使第一目标图像子区域的位置权重更加准确地表征第一目标图像子区域在第一图像中的位置的重要程度。In this embodiment, the second weight is negatively correlated with the time interval between the first image and the second image, so that the position weight of the sub-region of the first target image can more accurately characterize the sub-region of the first target image in the first image. the importance of the location in the .
作为一种可选的实施方式,参照图7,确定各个图像子区域的子区域质量评分,包括以下步骤:As an optional implementation manner, referring to FIG. 7 , determining the sub-region quality score of each image sub-region includes the following steps:
S210、根据至少一种图像质量判别算法对图像子区域的图像质量进行判别,得到各种图像质量判别算法对应的子区域质量初始评分。S210: Distinguish the image quality of the sub-regions of the image according to at least one image quality determination algorithm, and obtain initial quality scores of the sub-regions corresponding to various image quality determination algorithms.
图像质量判别算法可以是Laplacian算法、Sobel算法中的至少一者。这仅是简单的举例。图像质量判别算法的数量、类型等可以根据应用场景的需求进行设定。例如,图像质量判别算法可根据实际业务替换,增加对更多图像判别指标(如亮度、颜色等)的判别。The image quality determination algorithm may be at least one of Laplacian algorithm and Sobel algorithm. This is just a simple example. The number and type of image quality discrimination algorithms can be set according to the requirements of the application scenario. For example, the image quality discrimination algorithm can be replaced according to the actual service, and the discrimination of more image discrimination indicators (such as brightness, color, etc.) can be added.
S220、根据各个子区域质量初始评分确定图像子区域的子区域质量评分。S220. Determine the sub-region quality score of the image sub-region according to the initial quality score of each sub-region.
根据各个子区域质量初始评分确定图像子区域的子区域质量评分可以是,将各个子区域质量初始评分求和,以得到图像子区域的子区域质量评分;也可以是,将各个子区域质量初始评分求和并求平均,以得到图像子区域的子区域质量评分;也可以是,将各个子区域质量初始评分加权,然后求和,以得到图像子区域的子区域质量评分。本公开实施例对此不做限定。Determining the sub-region quality scores of the image sub-regions according to the initial quality scores of the sub-regions may be: summing the initial quality scores of the sub-regions to obtain the sub-region quality scores of the image sub-regions; The scores are summed and averaged to obtain the sub-region quality scores of the image sub-regions; alternatively, the initial quality scores of each sub-region are weighted and then summed to obtain the sub-region quality scores of the image sub-regions. This embodiment of the present disclosure does not limit this.
在本公开实施例中,根据至少一种图像质量判别算法对图像子区域的图像质量进行判别,能够实现方便对图像质量判别算法进行升级,并能够通过不同图像质量判别算法针对多种指标进行判别,使得子区域质量评分能够更加准确地表征图像子区域的图像质量。In the embodiment of the present disclosure, the image quality of the image sub-regions is discriminated according to at least one image quality discriminating algorithm, which can facilitate the upgrading of the image quality discriminating algorithm, and can discriminate against various indicators through different image quality discriminating algorithms. , so that the sub-region quality score can more accurately characterize the image quality of the image sub-region.
作为一种可选的实施方式,参照图8,根据各个图像子区域的子区域质量评分确定第一图像的图像质量评分的步骤之后,所述方法还包括以下步骤:As an optional implementation manner, referring to FIG. 8 , after the step of determining the image quality score of the first image according to the sub-region quality scores of each image sub-region, the method further includes the following steps:
S401、判断图像质量评分是否小于预设阈值。S401. Determine whether the image quality score is less than a preset threshold.
上述预设阈值可以是用户根据经验设置的经验值,或者可以是根据历史图像内容分析结果学习到的阈值等,本公开实施例对此不作限定。The above-mentioned preset threshold may be an experience value set by a user according to experience, or may be a threshold value learned according to an analysis result of historical image content, etc., which is not limited in this embodiment of the present disclosure.
S402、在图像质量评分小于预设阈值的情况下,丢弃第一图像。S402. In the case that the image quality score is less than a preset threshold, discard the first image.
上述图像质量评分小于预设阈值可以理解为,第一图像的质量不满足预设条件,或者第一图像的质量不合格。上述丢弃第一图像可以理解为不对上述第一图像执行内容分析操作,例如:删除或者跳过第一图像。通过步骤S402可以避免对质量不合格的图像进行内容分析导致无效计算。It can be understood that the above-mentioned image quality score is less than the preset threshold value, that the quality of the first image does not meet the preset condition, or the quality of the first image is unqualified. The foregoing discarding the first image may be understood as not performing a content analysis operation on the foregoing first image, for example, deleting or skipping the first image. Through step S402, it is possible to avoid invalid calculation caused by content analysis on images with unqualified quality.
S403、在图像质量评分大于或等于预设阈值的情况下,将第一图像作为待分析图像。S403. In the case that the image quality score is greater than or equal to a preset threshold, use the first image as the image to be analyzed.
上述图像质量评分大于或者等于预设阈值可以理解为,第一图像的质量满足预设条件,或者第一图像的质量合格。It can be understood that the above-mentioned image quality score is greater than or equal to the preset threshold value, it can be understood that the quality of the first image satisfies the preset condition, or the quality of the first image is qualified.
上述待分析图像可以理解为进行内容分析的图像。本公开实施例中,对内容分析操作不做限定,例如:内容分析操作可以是当前已有内容分析操作或者该内容分 析操作可以是后续演进的内容分析操作。The above image to be analyzed can be understood as an image for content analysis. In the embodiment of the present disclosure, the content analysis operation is not limited, for example, the content analysis operation may be a currently existing content analysis operation or the content analysis operation may be a content analysis operation of subsequent evolution.
图9是本公开实施例提供的一种图像处理方法的流程图,如图9所示,包括以下步骤:FIG. 9 is a flowchart of an image processing method provided by an embodiment of the present disclosure. As shown in FIG. 9 , the method includes the following steps:
S501、对待分析图像进行内容分析,得到内容分析结果。S501. Perform content analysis on the image to be analyzed to obtain a content analysis result.
S502、在内容分析结果表明待分析图像中包括目标对象的情况下,生成目标位置信息,其中,目标位置信息表征目标对象在待分析图像中的位置,目标位置信息用于在确定第一图像的图像质量评分时确定第一图像中的多个图像子区域的位置权重,第一图像为在待分析图像之后采集的图像,多个图像子区域中相邻的图像子区域存在重叠区域。S502. In the case where the content analysis result indicates that the image to be analyzed includes the target object, generate target position information, wherein the target position information represents the position of the target object in the image to be analyzed, and the target position information is used to determine the position of the first image. The position weights of multiple image sub-regions in the first image are determined when the image quality is scored. The first image is an image collected after the image to be analyzed, and adjacent image sub-regions in the multiple image sub-regions have overlapping regions.
本公开实施例中,待分析图像为图像质量评分大于预设阈值的图像,图像质量评分为通过步骤S100至S300确定的。图像质量评分大于或者等于预设阈值可以理解为,待分析图像的质量满足预设条件,或者待分析图像的质量合格。In this embodiment of the present disclosure, the image to be analyzed is an image with an image quality score greater than a preset threshold, and the image quality score is determined through steps S100 to S300. When the image quality score is greater than or equal to the preset threshold, it can be understood that the quality of the image to be analyzed satisfies the preset condition, or the quality of the image to be analyzed is qualified.
在本公开实施例中,只针对经过筛选得到的满足预设条件或质量合格的图像进行内容分析,能够避免对质量不合格的图像进行内容分析导致无效计算,从而提高内容分析效率;同时在发现目标对象时生成目标位置信息,有利于在基于图像质量的图像筛选过程中,提升图像筛选的准确性。In the embodiment of the present disclosure, content analysis is only performed on the images that meet the preset conditions or the quality is qualified, which can avoid the invalid calculation caused by the content analysis of the unqualified images, thereby improving the content analysis efficiency; The target position information is generated when the target object is generated, which is beneficial to improve the accuracy of image screening in the process of image screening based on image quality.
一种实施方式,如下:One implementation is as follows:
根据实际业务场景,将第一图像划分为S个图像子区域,图像子区域的位置权重表示为α。根据各个图像子区域I s在第一图像上的位置的重要程度预设各个图像子区域I s的第一权重(或者称作空间权重)α space,α space的取值范围可以是0≤α space≤1。第一目标图像子区域的位置权重α可以表示为α=α spacefeedback。其中,α feedback表示第一目标图像子区域的第二权重(或者称作反馈权重),表示目标对象在第二图像中的位置对第一图像的质量评估的影响,α feedback的取值范围可以是0.001≤α feedback≤0.5。其中,α feedback的获取方法可以如下: According to the actual business scenario, the first image is divided into S image sub-regions, and the position weight of the image sub-regions is represented as α. Preset subregions each image I s based on the importance of each sub-image regions I s position on the first image first weight (referred to as spatial or weights) α space, in the range α space may be 0≤α space ≤1. The position weight α of the first target image sub-region can be expressed as α=α spacefeedback . Among them, α feedback represents the second weight (or feedback weight) of the sub-region of the first target image, which represents the influence of the position of the target object in the second image on the quality evaluation of the first image, and the value range of α feedback can be is 0.001≤α feedback ≤0.5. Among them, the acquisition method of α feedback can be as follows:
假设每连续的m帧作为一个时间统计周期,从内容分析结果获取第二图像中已发现的目标对象的位置,记为重点位置;对上述重点位置对应的第一图像中的图像子区域,即第一目标图像子区域,按照指数衰减方式计算本时间统计周期内第一目标图像子区域的第二权重:Assuming that each consecutive m frame is a time statistical period, the position of the target object found in the second image is obtained from the content analysis result, and recorded as the key position; for the image sub-region in the first image corresponding to the above key position, that is For the first target image sub-region, calculate the second weight of the first target image sub-region in the current statistical period according to the exponential decay method:
Figure PCTCN2021106200-appb-000001
Figure PCTCN2021106200-appb-000001
Figure PCTCN2021106200-appb-000002
Figure PCTCN2021106200-appb-000002
α feedback(t)=exp[-θ(t+1)] α feedback (t)=exp[-θ(t+1)]
其中,α feedback(t)表示随着时间t的改变,第一目标图像子区域的α feedback随时间衰减,第一目标图像子区域的α feedback取值从0.5经过m帧后衰减为0.001。 Among them, α feedback (t) indicates that with the change of time t, the α feedback of the first target image sub-region decays with time, and the α feedback value of the first target image sub-region decays from 0.5 to 0.001 after m frames.
将第二目标图像子区域的第一权重α space作为第二目标图像子区域的位置权重,即α=α spaceThe first weight α space of the second target image sub-region is taken as the position weight of the second target image sub-region, that is, α=α space .
进一步的,获得各图像子区域I s对应的α i后,进行归一化处理,以实现
Figure PCTCN2021106200-appb-000003
其中,α i表示第i个图像子区域的权重。
Further, after obtaining the images corresponding to the sub-region I s α i, for normalization, in order to achieve
Figure PCTCN2021106200-appb-000003
Among them, α i represents the weight of the ith image sub-region.
需要说明的是,本公开实施例中,并不限定通过上述公式设定上述第二权重,例如:将第二权重可取的最小值和最大值设置为多个等级,第一图像与第二图像之间每间隔一帧图像,第二权值的取值就降低一个等级,以最大值为0.5,最小值为0.1为例,当第一图像与第二图像之间不存在间隔图像,则将第二权值设置为0.5,当第一图像与第二图像之间间隔1帧图像,则将第二权值设置为0.4,以此递减。It should be noted that, in the embodiment of the present disclosure, it is not limited to use the above formula to set the above-mentioned second weight. For example, the minimum and maximum values of the second weight are set to multiple levels, and the Every time there is a frame of image between them, the value of the second weight is reduced by one level. Taking the maximum value of 0.5 and the minimum value of 0.1 as an example, when there is no interval image between the first image and the second image, the The second weight is set to 0.5, and when there is one frame of image between the first image and the second image, the second weight is set to 0.4 to decrease.
进一步,确定第二权重时,并不限定上述内容分析结果表示第二图像的第二目标图像子区域包括目标对象,例如:当第二图像中包括目标对象时,则可以将第一图像的各图像子区域的第二权重均进行增加,反之,可以均进行减少,以通过第二图像的内容分析结果增加或者降低第一图像的整体权重。进一步,上述第二图像可以是发现存在目标对象的图像。Further, when determining the second weight, it is not limited that the above content analysis result indicates that the second target image sub-region of the second image includes the target object. The second weights of the sub-regions of the image are all increased, otherwise, they may all be decreased, so as to increase or decrease the overall weight of the first image according to the content analysis result of the second image. Further, the above-mentioned second image may be an image in which the target object is found to exist.
以图10为例,本公开实施例中可以包括摄像头模块、视频解码模块、质量筛查模块和内容分析模块,其中:Taking FIG. 10 as an example, an embodiment of the present disclosure may include a camera module, a video decoding module, a quality screening module, and a content analysis module, wherein:
摄像头模块可以为电子设备内置或外置的可实时采集图像的硬件;The camera module can be built-in or external hardware that can collect images in real time;
视频解码模块,可以用于对来自摄像头模块的视频流进行解码,转换为各帧独立的图像;The video decoding module can be used to decode the video stream from the camera module and convert it into an independent image of each frame;
质量筛查模块,用于获取图像的图像质量评分,且所使用的质量评价算法包可按照业务需求进行增加和修改,可使用一种或多种不同的质量评价算法对图像进行分区域独立统计,综合汇总;The quality screening module is used to obtain the image quality score of the image, and the quality evaluation algorithm package used can be added and modified according to business needs, and one or more different quality evaluation algorithms can be used to perform regional independent statistics on the image. , a comprehensive summary;
内容分析模块,用于质量筛查模块已判别为符合画面质量的图像进行分析,输出分析结果。同时,内容分析模块向质量筛查模块反馈发现的目标对象的内容分析结果,如表示目标对象所在的区域,由质量筛查模块在后续一定的连续帧间隔内对该区域的图像质量进行指数衰减加权。The content analysis module is used to analyze the images that the quality screening module has judged to meet the picture quality, and output the analysis results. At the same time, the content analysis module feeds back the content analysis result of the target object found to the quality screening module, such as the region where the target object is located, and the quality screening module performs exponential attenuation of the image quality of the region within a certain subsequent frame interval. weighted.
这样通过上述内容分析模块的反馈可以使得图像子区域的位置权重更加准确。In this way, the position weight of the image sub-region can be made more accurate through the feedback of the content analysis module.
当然,在一些场景或者针对一些图像,可以不设置第二权重,即可以只设置上述第一权重,例如:第一图像前面的多帧图像均不存在目标对象,可以不设置第二权重。Of course, in some scenes or for some images, the second weight may not be set, that is, only the first weight may be set. For example, if there is no target object in the multiple frames before the first image, the second weight may not be set.
作为一种可选的实施方式,上述计算每个图像子区域的子区域质量评分,包括:针对每个图像子区域,使用一种或者多种图像质量判别算法对图像子区域的图像质量进行判别,得到图像子区域的子区域质量评分。As an optional implementation manner, the above calculation of the sub-region quality score of each image sub-region includes: for each image sub-region, using one or more image quality discrimination algorithms to discriminate the image quality of the image sub-region , get the sub-region quality score of the image sub-region.
且使用多种图像质量判别算法时,每种图像质量判别算法可以设置相应的权重。And when multiple image quality judging algorithms are used, each image quality judging algorithm can set a corresponding weight.
例如:可以通过
Figure PCTCN2021106200-appb-000004
共j=1,2,...,k中图像质量判别算法,Q s表示某一图像子区域的质量评分,f j(·)表示图像质量判别算法对应的子区域质量初始评分,ω j表示图像质量判别算法对应的权重,
Figure PCTCN2021106200-appb-000005
For example: by
Figure PCTCN2021106200-appb-000004
A total of j=1, 2,..., k image quality discrimination algorithms, Q s represents the quality score of a certain image sub-region, f j ( ) represents the initial quality score of the sub-region corresponding to the image quality discrimination algorithm, ω j represents the weight corresponding to the image quality discrimination algorithm,
Figure PCTCN2021106200-appb-000005
需要说明的是,本公开实施例中,图像质量判别算法包括但不限于用Laplacian算法、Sobel算法。It should be noted that, in the embodiment of the present disclosure, the image quality determination algorithm includes, but is not limited to, the Laplacian algorithm and the Sobel algorithm.
该实施方式中,根据至少一种图像质量判别算法对图像子区域的图像质量进行 判别,能够实现方便对图像质量判别算法进行升级,并能够通过不同图像质量判别算法针对多种指标进行判别,使得子区域质量评分能够更加准确地表征图像子区域的图像质量。In this embodiment, the image quality of the image sub-regions is discriminated according to at least one image quality discriminating algorithm, which can facilitate the upgrading of the image quality discriminating algorithm, and can discriminate against various indicators through different image quality discriminating algorithms, so that the The sub-region quality score can more accurately characterize the image quality of an image sub-region.
进一步的,本公开实施例中,还可以根据实际业务需求或者图像的类型对计算图像子区域的子区域质量评分的图像质量判别算法进行修改或者替换,便于实现后期在不改动电子设备硬件的前提下通过算法包升级,增加对更多的画面判别指标(如对亮度、颜色等)的判别。Further, in the embodiment of the present disclosure, the image quality discrimination algorithm for calculating the sub-region quality score of the sub-region of the image can also be modified or replaced according to the actual business requirements or the type of the image, so as to facilitate the realization of the premise of not changing the hardware of the electronic device in the later stage. Next, through the algorithm package upgrade, the discrimination of more picture discrimination indicators (such as brightness, color, etc.) is added.
本公开实施例中,由于先分别确定各个图像子区域的子区域质量评分,能够对各个图像子区域的图像质量单独进行评价,然后依据各个图像子区域的子区域质量评分获取第一图像的图像质量评分,使得对第一图像的图像质量评分能够更加准确地反映第一图像的图像质量。图像质量评分能够应用于基于图像质量的图像筛选,并能够提升图像筛选的准确度,例如,将图像质量不合格的图像筛除,只对图像质量合格的图像进行内容分析,从而可以降低图像内容分析的功耗,提升图像内容分析的效率。In the embodiment of the present disclosure, since the sub-region quality scores of each image sub-region are determined respectively, the image quality of each image sub-region can be evaluated individually, and then the image of the first image is obtained according to the sub-region quality scores of each image sub-region The quality score enables the image quality score of the first image to more accurately reflect the image quality of the first image. Image quality scoring can be applied to image screening based on image quality, and can improve the accuracy of image screening. For example, images with unqualified image quality are filtered out, and content analysis is performed only on images with acceptable image quality, which can reduce the image content. The power consumption of analysis improves the efficiency of image content analysis.
参见图12,图12是本公开实施提供的另一种图像处理方法的流程图,如图12所示,包括以下步骤:Referring to FIG. 12, FIG. 12 is a flowchart of another image processing method provided by the implementation of the present disclosure, as shown in FIG. 12, including the following steps:
S601、对来自电子设备的摄像头硬件的视频进行解码、图像预处理,循环获得图像I;S601, decoding and image preprocessing are carried out to the video from the camera hardware of the electronic device, and the image I is obtained in a loop;
S602、对I图像进行区域划分,获得共s个图像子区域,每个图像子区域的分辨率为u×v。s个图像子区域中相邻的图像子区域存在重叠区域。按照不同图像子区域在图像中的位置预设第一权重(或称空间权重)α spaceS602: Divide the I image into regions to obtain a total of s image sub-regions, and the resolution of each image sub-region is u×v. The adjacent image sub-regions in the s image sub-regions have overlapping regions. The first weight (or spatial weight) α space is preset according to the positions of different image sub-regions in the image.
例如,图像靠画面上部分为天空,重要性较低,图像靠近画面下部为所需监控的人员移动区域,重要程度较高,因此可根据业务需要确定空间权重α spaceFor example, the upper part of the image is the sky, which is of low importance, and the image near the lower part of the screen is the moving area of people to be monitored, which has a high degree of importance. Therefore, the spatial weight α space can be determined according to business needs.
如图10所示的质量筛查模块接收后续内容分析模块反馈的目标位置信息,如后续Yolo算法得到的目标感兴趣区域(ROI,Region Of Interest)的目标位置信息,再使用指数衰减方法获取第一目标图像子区域的第二权重α feedback,进一步得到第一目标图像子区域的位置权重α=α spacefeedback;第二目标图像子区域的位置权重α=α space。对各个图像子区域的位置权重α进行归一化处理,各个图像子区域的位置权重的和等于1。 The quality screening module shown in Figure 10 receives the target position information fed back by the subsequent content analysis module, such as the target position information of the target region of interest (ROI, Region Of Interest) obtained by the subsequent Yolo algorithm, and then uses the exponential decay method to obtain the first The second weight α feedback of a target image sub-region further obtains the position weight of the first target image sub-region α=α spacefeedback ; the position weight of the second target image sub-region α=α space . The position weight α of each image sub-region is normalized, and the sum of the position weights of each image sub-region is equal to 1.
S603、对于每一个图像子区域,使用Laplacian和Sobel两种算法获取图像子区域的子区域质量评分。S603. For each image sub-region, use two algorithms, Laplacian and Sobel, to obtain the sub-region quality score of the image sub-region.
具体可以是综合使用Laplacian和Sobel两种算法做模糊度判断,两种算法之间的权值分别为ω 1和ω 2,且ω 12=1。 Specifically, two algorithms, Laplacian and Sobel, can be comprehensively used for ambiguity judgment. The weights between the two algorithms are ω 1 and ω 2 respectively , and ω 12 =1.
其中,对于每一个子区域I sWherein, for each sub-region I s:
使用Laplacian算法获得图像二阶导数矩阵的方差值作为子区域质量初始评分f 1(·);使用Sobel算法获得图像差分矩阵的均值作为子区域质量初始评分f 2(·); Use the Laplacian algorithm to obtain the variance value of the image second derivative matrix as the initial sub-region quality score f 1 (·); use the Sobel algorithm to obtain the mean value of the image difference matrix as the sub-region quality initial score f 2 (·);
得到子区域质量评分Q s=ω 1×f 1(·)+ω 2×f 2(·)。 The sub-region quality score Q s1 ×f 1 (·)+ω 2 ×f 2 (·) is obtained.
之后,对全部图像子区域按照位置权重进行汇总,以得到图像质量评分Q Total,具体可以是将图像子区域的子区域质量评分与对应的位置权重相乘,再求和。 Afterwards, all the sub-regions of the image are summarized according to the position weights to obtain the image quality score Q Total . Specifically, the sub-region quality scores of the sub-regions of the image may be multiplied by the corresponding position weights, and then summed.
S604、对图像质量评分进行门限判别与决策。S604. Perform threshold discrimination and decision on the image quality score.
该步骤可以是根据最终的图像质量评分Q Total判断该帧图像是否进入后续内容分析环节,具体可以如下: This step may be to determine whether the frame of image enters the subsequent content analysis link according to the final image quality score Q Total, which may be specifically as follows:
Figure PCTCN2021106200-appb-000006
Figure PCTCN2021106200-appb-000006
其中,T Threshold表示预设阈值。 Wherein, T Threshold represents a preset threshold.
这样可以实现针对合格的图像进行内容分析,不合格图像丢弃,以降低图像内容分析的功耗。In this way, content analysis can be performed on qualified images, and unqualified images are discarded, so as to reduce the power consumption of image content analysis.
参见图13,图13是本公开实施例提供的一种图像处理装置的结构图,如图13所示,图像处理装置100包括:Referring to FIG. 13, FIG. 13 is a structural diagram of an image processing apparatus provided by an embodiment of the present disclosure. As shown in FIG. 13, the image processing apparatus 100 includes:
划分模块101,用于将第一图像进行区域划分,得到多个图像子区域,其中,多个图像子区域中相邻的图像子区域存在重叠区域;The dividing module 101 is configured to divide the first image into regions to obtain a plurality of image sub-regions, wherein adjacent image sub-regions in the plurality of image sub-regions have overlapping regions;
计算模块102,用于确定各个图像子区域的子区域质量评分,子区域质量评分表征图像子区域的图像质量;The calculation module 102 is used to determine the sub-region quality score of each image sub-region, and the sub-region quality score represents the image quality of the image sub-region;
获取模块103,用于根据各个图像子区域的子区域质量评分确定第一图像的图像质量评分,图像质量评分表征第一图像的图像质量。The acquiring module 103 is configured to determine the image quality score of the first image according to the sub-region quality scores of each image sub-region, where the image quality score represents the image quality of the first image.
作为一种可选的实施方式,获取模块103包括:As an optional implementation manner, the obtaining module 103 includes:
图像质量评分获取单元,用于根据各个图像子区域的位置权重对各个图像子区域的子区域质量评分进行加权,并求和,得到第一图像的图像质量评分,其中,图像子区域的位置权重表征图像子区域在第一图像中的位置的重要程度。The image quality score obtaining unit is used for weighting the sub-region quality scores of each image sub-region according to the position weight of each image sub-region, and summing them up to obtain the image quality score of the first image, wherein the position weight of the image sub-region is Characterizes the importance of the position of the image sub-region in the first image.
作为一种可选的实施方式,获取模块103还包括:As an optional implementation manner, the obtaining module 103 further includes:
位置权重确定单元,用于获取目标位置信息,目标位置信息表征对第二图像进行内容分析所确定的目标对象在第二图像中的位置,第二图像为在第一图像之前采集的图像。The position weight determination unit is used for acquiring target position information, the target position information representing the position of the target object in the second image determined by performing content analysis on the second image, and the second image is an image collected before the first image.
位置权重确定单元还用于根据目标位置信息确定各个图像子区域的位置权重。The position weight determination unit is further configured to determine the position weight of each image sub-region according to the target position information.
作为一种可选的实施方式,位置权重确定单元用于根据目标位置信息将多个图像子区域划分为至少一个第一目标图像子区域和至少一个第二目标图像子区域,第一目标图像子区域为在第一图像中与目标对象在第二图像中的位置相对应的图像子区域。As an optional implementation manner, the position weight determination unit is configured to divide the plurality of image sub-regions into at least one first target image sub-region and at least one second target image sub-region according to the target position information, and the first target image sub-region A region is an image sub-region in the first image that corresponds to the position of the target object in the second image.
位置权重确定单元还用于确定各个第一目标图像子区域的第二权重,第一目标图像子区域的第二权重表征第一目标图像子区域中包括目标对象的可能性。The position weight determination unit is further configured to determine a second weight of each of the first target image sub-areas, where the second weight of the first target image sub-area represents the possibility that the first target image sub-area includes a target object.
位置权重确定单元还用于根据各个第一目标图像子区域的第一权重和各个第一目标图像子区域的第二权重,确定各个第一目标图像子区域的位置权重。The position weight determination unit is further configured to determine the position weight of each first target image sub-region according to the first weight of each first target image sub-region and the second weight of each first target image sub-region.
位置权重确定单元还用于将各个第二目标图像子区域的第一权重确定为各个第二目标图像子区域的位置权重。The position weight determination unit is further configured to determine the first weight of each second target image sub-region as the position weight of each second target image sub-region.
其中,图像子区域的第一权重表征图像子区域在第一图像中的位置的重要程度。The first weight of the image sub-region represents the importance of the position of the image sub-region in the first image.
作为一种可选的实施方式,位置权重确定单元还用于对各个图像子区域的位置权重进行归一化处理,以使各个图像子区域的位置权重的和等于1。As an optional implementation manner, the position weight determination unit is further configured to perform normalization processing on the position weights of each image sub-region, so that the sum of the position weights of each image sub-region is equal to 1.
作为一种可选的实施方式,位置权重确定单元还用于根据第一图像与第二图像之间的时间间隔确定各个第一目标图像子区域的第二权重,第一目标图像子区域的第二权重与第一图像与第二图像之间的时间间隔负相关。As an optional implementation manner, the position weight determination unit is further configured to determine the second weight of each sub-region of the first target image according to the time interval between the first image and the second image. The two weights are negatively related to the time interval between the first image and the second image.
作为一种可选的实施方式,计算模块102包括:As an optional implementation manner, the computing module 102 includes:
子区域质量判别单元,用于根据至少一种图像质量判别算法对图像子区域的图像质量进行判别,得到各种图像质量判别算法对应的子区域质量初始评分。The sub-region quality judging unit is used for judging the image quality of the image sub-regions according to at least one image quality judging algorithm, and obtaining the sub-region quality initial scores corresponding to various image quality judging algorithms.
子区域质量评分单元,用于根据各个子区域质量初始评分确定图像子区域的子区域质量评分。The sub-region quality scoring unit is configured to determine the sub-region quality scores of the image sub-regions according to the initial quality scores of each sub-region.
作为一种可选的实施方式,图像处理装置还包括筛选模块。As an optional implementation manner, the image processing apparatus further includes a screening module.
筛选模块用于判断图像质量评分是否小于预设阈值;在图像质量评分小于预设阈值的情况下,丢弃第一图像;在图像质量评分大于或等于预设阈值的情况下,将第一图像作为待分析图像。The screening module is used to judge whether the image quality score is less than the preset threshold; in the case of the image quality score less than the preset threshold, discard the first image; in the case of the image quality score greater than or equal to the preset threshold, use the first image as the image to be analyzed.
参见图14,图14是本公开实施例提供的一种图像处理装置的结构图,如图14所示,图像处理装置200包括:Referring to FIG. 14, FIG. 14 is a structural diagram of an image processing apparatus provided by an embodiment of the present disclosure. As shown in FIG. 14, the image processing apparatus 200 includes:
分析模块201,用于对待分析图像进行内容分析,得到内容分析结果;An analysis module 201, configured to perform content analysis on the image to be analyzed to obtain a content analysis result;
反馈模块202,用于在内容分析结果表明待分析图像中包括目标对象的情况下,生成目标位置信息,其中,目标位置信息表征目标对象在待分析图像中的位置,目标位置信息用于在确定第一图像的图像质量评分时确定第一图像中的多个图像子区域的位置权重,第一图像为在待分析图像之后采集的图像,多个图像子区域中相邻的图像子区域存在重叠区域。The feedback module 202 is configured to generate target position information when the content analysis result indicates that the target object is included in the image to be analyzed, wherein the target position information represents the position of the target object in the image to be analyzed, and the target position information is used to determine the target position. The position weights of multiple image sub-regions in the first image are determined when the image quality of the first image is scored, the first image is an image collected after the image to be analyzed, and adjacent image sub-regions in the multiple image sub-regions overlap area.
需要说明的是,本公开实施例中的图像处理装置可以是装置,也可以是电子设备中的部件、集成电路、或芯片。It should be noted that, the image processing apparatus in the embodiments of the present disclosure may be an apparatus, and may also be a component, an integrated circuit, or a chip in an electronic device.
参见图15,图15是本公开实施例提供的一种电子设备的结构图,如图15所示,电子设备300包括:存储器301、处理器302及存储在存储器301上并可在处理器302上运行的程序或者指令,程序或者指令被处理器302执行时实现上述图像处理方法中的步骤。Referring to FIG. 15 , FIG. 15 is a structural diagram of an electronic device provided by an embodiment of the present disclosure. As shown in FIG. 15 , the electronic device 300 includes: a memory 301 , a processor 302 , and a memory 301 and a processor 302 A program or instruction running on the processor 302 implements the steps in the above image processing method when the program or instruction is executed by the processor 302 .
本公开实施例还提供一种可读存储介质,可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述图像处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present disclosure further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium. When the program or instruction is executed by a processor, each process of the above image processing method embodiments can be implemented, and the same technology can be achieved. The effect, in order to avoid repetition, is not repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存 在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or apparatus that includes the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in the reverse order depending on the functions involved. To perform functions, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.

Claims (20)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, comprising:
    将第一图像进行区域划分,得到多个图像子区域,其中,多个所述图像子区域中相邻的图像子区域存在重叠区域;Dividing the first image into regions to obtain a plurality of image sub-regions, wherein adjacent image sub-regions in the plurality of image sub-regions have overlapping regions;
    确定各个所述图像子区域的子区域质量评分,所述子区域质量评分表征所述图像子区域的图像质量;determining a sub-region quality score of each of the image sub-regions, the sub-region quality score representing the image quality of the image sub-region;
    根据各个所述图像子区域的子区域质量评分确定所述第一图像的图像质量评分,所述图像质量评分表征所述第一图像的图像质量。The image quality score of the first image is determined according to the sub-region quality score of each of the image sub-regions, and the image quality score represents the image quality of the first image.
  2. 如权利要求1所述的方法,其特征在于,根据各个所述图像子区域的子区域质量评分确定所述第一图像的图像质量评分的步骤,包括:The method of claim 1, wherein the step of determining the image quality score of the first image according to the sub-region quality scores of each of the image sub-regions comprises:
    根据各个所述图像子区域的位置权重对各个所述图像子区域的子区域质量评分进行加权,并求和,得到所述第一图像的图像质量评分,其中,所述图像子区域的位置权重表征所述图像子区域在所述第一图像中的位置的重要程度。The sub-region quality scores of each of the image sub-regions are weighted according to the position weight of each of the image sub-regions, and summed to obtain the image quality score of the first image, wherein the position weight of the image sub-regions is Indicates the importance of the position of the image sub-region in the first image.
  3. 如权利要求2所述的方法,其特征在于,在根据各个所述图像子区域的位置权重和子区域质量评分,确定所述第一图像的图像质量评分的步骤之前,根据各个所述图像子区域的子区域质量评分确定所述第一图像的图像质量评分的步骤,还包括:The method according to claim 2, wherein, before the step of determining the image quality score of the first image according to the position weight and the sub-region quality score of each of the image sub-regions, according to each of the image sub-regions The step of determining the image quality score of the first image by the sub-area quality score further includes:
    获取目标位置信息,所述目标位置信息表征对第二图像进行内容分析所确定的目标对象在所述第二图像中的位置,所述第二图像为在所述第一图像之前采集的图像;acquiring target position information, the target position information representing the position of the target object in the second image determined by performing content analysis on the second image, and the second image is an image collected before the first image;
    根据所述目标位置信息确定各个所述图像子区域的位置权重。The position weight of each of the image sub-regions is determined according to the target position information.
  4. 如权利要求3所述的方法,其特征在于,根据所述目标位置信息确定各个所述图像子区域的位置权重的步骤,包括:The method according to claim 3, wherein the step of determining the position weight of each of the image sub-regions according to the target position information comprises:
    根据所述目标位置信息将多个所述图像子区域划分为至少一个第一目标图像子区域和至少一个第二目标图像子区域,所述第一目标图像子区域为在所述第一图像中与所述目标对象在所述第二图像中的位置相对应的图像子区域;The plurality of image sub-regions are divided into at least one first target image sub-region and at least one second target image sub-region according to the target position information, and the first target image sub-region is in the first image an image sub-region corresponding to the position of the target object in the second image;
    确定各个所述第一目标图像子区域的第二权重,所述第一目标图像子区域的第二权重表征所述第一目标图像子区域中包括所述目标对象的可能性;determining a second weight of each of the first target image sub-regions, where the second weight of the first target image sub-region represents the possibility that the first target image sub-region includes the target object;
    根据各个所述第一目标图像子区域的第一权重和各个所述第一目标图像子区域的第二权重,确定各个所述第一目标图像子区域的位置权重;Determine the position weight of each of the first target image sub-regions according to the first weight of each of the first target image sub-regions and the second weight of each of the first target image sub-regions;
    将各个所述第二目标图像子区域的第一权重确定为各个所述第二目标图像子区域的位置权重;Determining the first weight of each of the second target image sub-regions as the position weight of each of the second target image sub-regions;
    其中,所述图像子区域的第一权重表征所述图像子区域在所述第一图像中的位 置的重要程度。The first weight of the image sub-region represents the importance of the position of the image sub-region in the first image.
  5. 如权利要求4所述的方法,其特征在于,根据所述目标位置信息确定各个所述图像子区域的位置权重的步骤,还包括:The method according to claim 4, wherein the step of determining the position weight of each of the image sub-regions according to the target position information further comprises:
    对各个所述图像子区域的位置权重进行归一化处理,以使各个所述图像子区域的位置权重的和等于1。The position weights of each of the image sub-regions are normalized, so that the sum of the position weights of each of the image sub-regions is equal to 1.
  6. 如权利要求4所述的方法,其特征在于,确定各个所述第一目标图像子区域的第二权重的步骤,包括:The method of claim 4, wherein the step of determining the second weight of each of the first target image sub-regions comprises:
    根据所述第一图像与所述第二图像之间的时间间隔确定各个所述第一目标图像子区域的第二权重,所述第一目标图像子区域的第二权重与所述第一图像与所述第二图像之间的时间间隔负相关。The second weight of each of the first target image sub-regions is determined according to the time interval between the first image and the second image, and the second weight of the first target image sub-region is related to the first image. is negatively correlated with the time interval between the second images.
  7. 如权利要求1至6中任一项所述的方法,其特征在于,确定所述图像子区域的子区域质量评分的步骤包括:The method according to any one of claims 1 to 6, wherein the step of determining the sub-region quality score of the image sub-region comprises:
    根据至少一种图像质量判别算法对所述图像子区域的图像质量进行判别,得到各种图像质量判别算法对应的子区域质量初始评分;Distinguish the image quality of the image sub-regions according to at least one image quality judging algorithm, and obtain the initial quality scores of the sub-regions corresponding to various image quality judging algorithms;
    根据各个子区域质量初始评分确定所述图像子区域的子区域质量评分。The sub-region quality score of the image sub-region is determined according to the initial quality score of each sub-region.
  8. 如权利要求1至6中任一项所述的方法,其特征在于,根据各个所述图像子区域的子区域质量评分确定所述第一图像的图像质量评分的步骤之后,所述方法还包括:The method according to any one of claims 1 to 6, wherein after the step of determining the image quality score of the first image according to the sub-region quality scores of each of the image sub-regions, the method further comprises: :
    判断所述图像质量评分是否小于预设阈值;judging whether the image quality score is less than a preset threshold;
    在所述图像质量评分小于所述预设阈值的情况下,丢弃所述第一图像;In the case that the image quality score is less than the preset threshold, discarding the first image;
    在所述图像质量评分大于或等于所述预设阈值的情况下,将所述第一图像作为待分析图像。When the image quality score is greater than or equal to the preset threshold, the first image is used as the image to be analyzed.
  9. 一种图像处理方法,其特征在于,包括:An image processing method, comprising:
    对待分析图像进行内容分析,得到内容分析结果;Perform content analysis on the image to be analyzed to obtain content analysis results;
    在所述内容分析结果表明所述待分析图像中包括目标对象的情况下,生成目标位置信息,其中,所述目标位置信息表征所述目标对象在所述待分析图像中的位置,所述目标位置信息用于在确定第一图像的图像质量评分时确定所述第一图像中的多个图像子区域的位置权重,所述第一图像为在所述待分析图像之后采集的图像,多个所述图像子区域中相邻的图像子区域存在重叠区域。When the content analysis result indicates that the image to be analyzed includes a target object, target position information is generated, wherein the target position information represents the position of the target object in the image to be analyzed, and the target The location information is used to determine the location weights of multiple image sub-regions in the first image when determining the image quality score of the first image, where the first image is an image collected after the image to be analyzed, and multiple The adjacent image sub-regions in the image sub-regions have overlapping regions.
  10. 一种图像处理装置,其特征在于,包括:An image processing device, comprising:
    划分模块,用于将第一图像进行区域划分,得到多个图像子区域,其中,多个所述图像子区域中相邻的图像子区域存在重叠区域;a dividing module, configured to divide the first image into regions to obtain a plurality of image sub-regions, wherein adjacent image sub-regions in the plurality of image sub-regions have overlapping regions;
    计算模块,用于确定各个所述图像子区域的子区域质量评分,所述子区域质量评分表征所述图像子区域的图像质量;a calculation module, configured to determine a sub-region quality score of each of the image sub-regions, where the sub-region quality score represents the image quality of the image sub-region;
    获取模块,用于根据各个所述图像子区域的子区域质量评分确定所述第一图像的图像质量评分,所述图像质量评分表征所述第一图像的图像质量。An acquisition module, configured to determine an image quality score of the first image according to the sub-region quality scores of each of the image sub-regions, where the image quality score represents the image quality of the first image.
  11. 如权利要求10所述的装置,其特征在于,所述获取模块包括:The apparatus of claim 10, wherein the acquiring module comprises:
    图像质量评分获取单元,用于根据各个所述图像子区域的位置权重对各个所述图像子区域的子区域质量评分进行加权,并求和,得到所述第一图像的图像质量评分,其中,所述图像子区域的位置权重表征所述图像子区域在所述第一图像中的位置的重要程度。an image quality score obtaining unit, configured to weight the sub-region quality scores of each of the image sub-regions according to the position weight of each of the image sub-regions, and sum them up to obtain the image quality score of the first image, wherein, The position weight of the image sub-region represents the importance of the position of the image sub-region in the first image.
  12. 如权利要求11所述的装置,其特征在于,所述获取模块还包括:The apparatus of claim 11, wherein the obtaining module further comprises:
    位置权重确定单元,用于获取目标位置信息,所述目标位置信息表征对第二图像进行内容分析所确定的目标对象在所述第二图像中的位置,所述第二图像为在所述第一图像之前采集的图像;The position weight determination unit is used for acquiring target position information, the target position information represents the position of the target object determined by performing content analysis on the second image in the second image, and the second image is in the second image. an image acquired before an image;
    所述位置权重确定单元还用于根据所述目标位置信息确定各个所述图像子区域的位置权重。The position weight determination unit is further configured to determine the position weight of each of the image sub-regions according to the target position information.
  13. 如权利要求12所述的装置,其特征在于,所述位置权重确定单元用于根据所述目标位置信息将多个所述图像子区域划分为至少一个第一目标图像子区域和至少一个第二目标图像子区域,所述第一目标图像子区域为在所述第一图像中与所述目标对象在所述第二图像中的位置相对应的图像子区域;The apparatus according to claim 12, wherein the position weight determination unit is configured to divide a plurality of the image sub-regions into at least one first target image sub-region and at least one second target image sub-region according to the target position information a target image sub-region, the first target image sub-region is an image sub-region corresponding to the position of the target object in the second image in the first image;
    所述位置权重确定单元还用于确定各个所述第一目标图像子区域的第二权重,所述第一目标图像子区域的第二权重表征所述第一目标图像子区域中包括所述目标对象的可能性;The position weight determination unit is further configured to determine the second weight of each of the first target image sub-regions, and the second weight of the first target image sub-region indicates that the first target image sub-region includes the target. the possibility of the object;
    所述位置权重确定单元还用于根据各个所述第一目标图像子区域的第一权重和各个所述第一目标图像子区域的第二权重,确定各个所述第一目标图像子区域的位置权重;The position weight determination unit is further configured to determine the position of each of the first target image sub-regions according to the first weight of each of the first target image sub-regions and the second weight of each of the first target image sub-regions Weights;
    所述位置权重确定单元还用于将各个所述第二目标图像子区域的第一权重确定为各个所述第二目标图像子区域的位置权重;The position weight determination unit is further configured to determine the first weight of each of the second target image sub-regions as the position weight of each of the second target image sub-regions;
    其中,所述图像子区域的第一权重表征所述图像子区域在所述第一图像中的位置的重要程度。The first weight of the image sub-region represents the importance of the position of the image sub-region in the first image.
  14. 如权利要求13所述的装置,其特征在于,所述位置权重确定单元还用于对各个所述图像子区域的位置权重进行归一化处理,以使各个所述图像子区域的位置权重的和等于1。The apparatus according to claim 13, wherein the position weight determination unit is further configured to normalize the position weight of each of the image sub-regions, so that the position weight of each of the image sub-regions has a and equal to 1.
  15. 如权利要求13所述的装置,其特征在于,所述位置权重确定单元还用于 根据所述第一图像与所述第二图像之间的时间间隔确定各个所述第一目标图像子区域的第二权重,所述第一目标图像子区域的第二权重与所述第一图像与所述第二图像之间的时间间隔负相关。The apparatus according to claim 13, wherein the position weight determination unit is further configured to determine, according to the time interval between the first image and the second image, the sub-regions of the first target image. The second weight, the second weight of the first target image sub-region is negatively correlated with the time interval between the first image and the second image.
  16. 如权利要求10至15中任一项所述的装置,其特征在于,所述计算模块包括:The device according to any one of claims 10 to 15, wherein the computing module comprises:
    子区域质量判别单元,用于根据至少一种图像质量判别算法对所述图像子区域的图像质量进行判别,得到各种图像质量判别算法对应的子区域质量初始评分;a sub-area quality discrimination unit, configured to discriminate the image quality of the image sub-areas according to at least one image quality discrimination algorithm, and obtain initial sub-area quality scores corresponding to various image quality discrimination algorithms;
    子区域质量评分单元,用于根据各个子区域质量初始评分确定所述图像子区域的子区域质量评分。A sub-region quality scoring unit, configured to determine the sub-region quality scores of the image sub-regions according to the initial quality scores of each sub-region.
  17. 如权利要求10至15中任一项所述的装置,其特征在于,所述图像处理装置还包括筛选模块;The device according to any one of claims 10 to 15, wherein the image processing device further comprises a screening module;
    所述筛选模块用于判断所述图像质量评分是否小于预设阈值;在所述图像质量评分小于所述预设阈值的情况下,丢弃所述第一图像;在所述图像质量评分大于或等于所述预设阈值的情况下,将所述第一图像作为待分析图像。The screening module is configured to judge whether the image quality score is less than a preset threshold; in the case that the image quality score is less than the preset threshold, discard the first image; if the image quality score is greater than or equal to In the case of the preset threshold, the first image is used as the image to be analyzed.
  18. 一种图像处理装置,其特征在于,包括:An image processing device, comprising:
    分析模块,用于对待分析图像进行内容分析,得到内容分析结果;The analysis module is used to analyze the content of the image to be analyzed to obtain the content analysis result;
    反馈模块,用于在所述内容分析结果表明所述待分析图像中包括目标对象的情况下,生成目标位置信息,其中,所述目标位置信息表征所述目标对象在所述待分析图像中的位置,所述目标位置信息用于在确定第一图像的图像质量评分时确定所述第一图像中的多个图像子区域的位置权重,所述第一图像为在所述待分析图像之后采集的图像,多个所述图像子区域中相邻的图像子区域存在重叠区域。The feedback module is configured to generate target position information when the content analysis result indicates that the image to be analyzed includes a target object, wherein the target position information represents the position of the target object in the image to be analyzed. position, the target position information is used to determine the position weights of multiple image sub-regions in the first image when the image quality score of the first image is determined, and the first image is collected after the image to be analyzed image, and adjacent image sub-regions among the plurality of image sub-regions have overlapping regions.
  19. 一种电子设备,其特征在于,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的程序或者指令,所述程序或者指令被所述处理器执行时实现以下方法中的至少一种:An electronic device, characterized by comprising: a memory, a processor, and a program or instruction stored on the memory and executable on the processor, the program or instruction being executed by the processor to achieve the following At least one of the methods:
    如权利要求1至8中任一项所述的图像处理方法;The image processing method according to any one of claims 1 to 8;
    如权利要求9所述的图像处理方法。The image processing method according to claim 9.
  20. 一种可读存储介质,其特征在于,所述可读存储介质上存储有程序或指令,所述程序或指令被处理器执行时实现以下方法中的至少一种:A readable storage medium, characterized in that a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, at least one of the following methods is implemented:
    如权利要求1至8中任一项所述的图像处理方法;The image processing method according to any one of claims 1 to 8;
    如权利要求9所述的图像处理方法。The image processing method according to claim 9.
PCT/CN2021/106200 2020-07-14 2021-07-14 Image processing method and apparatus, electronic device, and storage medium WO2022012573A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010675459.7 2020-07-14
CN202010675459.7A CN113938671B (en) 2020-07-14 2020-07-14 Image content analysis method, image content analysis device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022012573A1 true WO2022012573A1 (en) 2022-01-20

Family

ID=79273766

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/106200 WO2022012573A1 (en) 2020-07-14 2021-07-14 Image processing method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN113938671B (en)
WO (1) WO2022012573A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116740063A (en) * 2023-08-14 2023-09-12 山东众志电子有限公司 Glass fiber yarn production quality detection method based on machine vision

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101277341B1 (en) * 2011-12-27 2013-06-20 연세대학교 산학협력단 Method for estimating image quality of image sequence, apparatus and method for estimating image quality of image frame
CN106934790A (en) * 2015-12-30 2017-07-07 浙江大华技术股份有限公司 A kind of evaluation method of image definition, the automatic method for focusing on and related device
CN109215028A (en) * 2018-11-06 2019-01-15 福州大学 A kind of multiple-objection optimization image quality measure method based on convolutional neural networks
CN109685772A (en) * 2018-12-10 2019-04-26 福州大学 It is a kind of based on registration distortion indicate without referring to stereo image quality appraisal procedure
CN110858286A (en) * 2018-08-23 2020-03-03 杭州海康威视数字技术股份有限公司 Image processing method and device for target recognition
CN111182212A (en) * 2019-12-31 2020-05-19 Oppo广东移动通信有限公司 Image processing method, image processing apparatus, storage medium, and electronic device

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5651340B2 (en) * 2010-01-22 2015-01-14 ミツミ電機株式会社 Image quality control apparatus, image quality control method, and image quality control program
CN104837007B (en) * 2014-02-11 2018-06-05 阿里巴巴集团控股有限公司 A kind of method and apparatus of digital picture quality classification
CN104079925B (en) * 2014-07-03 2016-05-18 中国传媒大学 Ultra high-definition video image quality method for objectively evaluating based on vision perception characteristic
US9922411B2 (en) * 2015-11-30 2018-03-20 Disney Enterprises, Inc. Saliency-weighted video quality assessment
CN108174185B (en) * 2016-12-07 2021-03-30 中兴通讯股份有限公司 Photographing method, device and terminal
US10565696B2 (en) * 2017-06-05 2020-02-18 Qualcomm Incorporated Systems and methods for producing image feedback
CN108108450B (en) * 2017-12-27 2022-01-28 北京乐蜜科技有限责任公司 Image processing method and related equipment
CN108898600B (en) * 2018-07-11 2021-03-23 上饶师范学院 Image quality evaluation method and device
CN109166261B (en) * 2018-10-11 2022-06-07 平安科技(深圳)有限公司 Image processing method, device and equipment based on image recognition and storage medium
CN109509201A (en) * 2019-01-04 2019-03-22 北京环境特性研究所 A kind of SAR image quality evaluating method and device
CN110838120A (en) * 2019-11-18 2020-02-25 方玉明 Weighting quality evaluation method of asymmetric distortion three-dimensional video based on space-time information
CN111401324A (en) * 2020-04-20 2020-07-10 Oppo广东移动通信有限公司 Image quality evaluation method, device, storage medium and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101277341B1 (en) * 2011-12-27 2013-06-20 연세대학교 산학협력단 Method for estimating image quality of image sequence, apparatus and method for estimating image quality of image frame
CN106934790A (en) * 2015-12-30 2017-07-07 浙江大华技术股份有限公司 A kind of evaluation method of image definition, the automatic method for focusing on and related device
CN110858286A (en) * 2018-08-23 2020-03-03 杭州海康威视数字技术股份有限公司 Image processing method and device for target recognition
CN109215028A (en) * 2018-11-06 2019-01-15 福州大学 A kind of multiple-objection optimization image quality measure method based on convolutional neural networks
CN109685772A (en) * 2018-12-10 2019-04-26 福州大学 It is a kind of based on registration distortion indicate without referring to stereo image quality appraisal procedure
CN111182212A (en) * 2019-12-31 2020-05-19 Oppo广东移动通信有限公司 Image processing method, image processing apparatus, storage medium, and electronic device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116740063A (en) * 2023-08-14 2023-09-12 山东众志电子有限公司 Glass fiber yarn production quality detection method based on machine vision
CN116740063B (en) * 2023-08-14 2023-11-14 山东众志电子有限公司 Glass fiber yarn production quality detection method based on machine vision

Also Published As

Publication number Publication date
CN113938671B (en) 2023-05-23
CN113938671A (en) 2022-01-14

Similar Documents

Publication Publication Date Title
AU2017261537B2 (en) Automated selection of keeper images from a burst photo captured set
US7916173B2 (en) Method for detecting and selecting good quality image frames from video
US20190034516A1 (en) Method and apparatus for acquiring an evaluation index
US7668389B2 (en) Image processing method, image processing apparatus, and image processing program
US20060182339A1 (en) Combining multiple cues in a visual object detection system
CN107241556B (en) Light measuring method and device of image acquisition equipment
US20070263928A1 (en) Method, apparatus, and program for processing red eyes
CN105631418A (en) People counting method and device
US8625922B2 (en) Image processing method and program for determining whether sabotage has occurred to an image
CN111935479B (en) Target image determination method and device, computer equipment and storage medium
WO2023025010A1 (en) Stroboscopic banding information recognition method and apparatus, and electronic device
WO2021013049A1 (en) Foreground image acquisition method, foreground image acquisition apparatus, and electronic device
US7596273B2 (en) Image processing method, image processing apparatus, and image processing program
CN108961209B (en) Pedestrian image quality evaluation method, electronic device and computer readable medium
CN108665459B (en) Image blur detection method, computing device and readable storage medium
CN111091093A (en) Method, system and related device for estimating number of high-density crowds
WO2022012573A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN111476160A (en) Loss function optimization method, model training method, target detection method, and medium
CN113920585A (en) Behavior recognition method and device, equipment and storage medium
CN113362221A (en) Face recognition system and face recognition method for entrance guard
CN114998438B (en) Target detection method and device and machine-readable storage medium
CN112489020B (en) Image screening method and device, electronic equipment and storage medium
CN109684991B (en) Image processing method, image processing device, electronic equipment and storage medium
CN111767757B (en) Identity information determining method and device
TWI695326B (en) Object attribute analyzing method and related object attribute analyzing device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21841481

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 03/05/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21841481

Country of ref document: EP

Kind code of ref document: A1