Static sign detection method, device, intelligent terminal and storage medium
By initially detecting the image area and calculating the characteristic parameters, the static mark area is accurately determined, which solves the problem of inaccurate static mark detection in motion estimation and motion compensation technology, and improves the efficiency of image interpolation calculation.
Patent Information
- Application Number
- CN202011453415.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-11
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-12-11
AI Technical Summary
In the existing motion estimation and motion compensation technology, static mark detection is not accurate enough, leading to misjudgment and affecting the efficiency of image frame interpolation calculation.
By initially detecting the image area to be detected in the current image, if it is a static mark area, determine the M image areas matching it in the reference image and the surrounding N image areas, calculate its characteristic parameters, and determine whether it is a static mark area. area.
The accuracy of static mark detection is improved, misjudgments are avoided, and the efficiency of image interpolation calculation is enhanced.
Smart Images

Figure CN112581493B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a static sign detection method, device, intelligent terminal and storage medium. Background Art
[0002] Motion estimation and motion compensation (MEMC) technology is a motion quality compensation technology used in display devices such as LCD TVs or projectors, which can make motion images clearer and smoother. Generally speaking, when using this technology to process images, it is necessary to distinguish between static objects and moving objects, that is, to detect static signs in the image. During the detection, some information in the image will affect the accuracy of the detection, resulting in misjudgment of static signs, which may further bring poor viewing experience to users. Therefore, how to accurately detect static signs in images is a problem that needs to be solved. Summary of the invention
[0003] The embodiments of the present application provide a static sign detection method, device, intelligent terminal and storage medium, which can accurately detect static signs in an image, avoid misjudgment during static sign detection, and further improve the efficiency of image interpolation calculation.
[0004] In order to solve the above technical problems, in a first aspect, an embodiment of the present application provides a static sign detection method, the method comprising:
[0005] Performing initial detection on the image area to be detected in the current image to obtain an initial detection result;
[0006] If the initial detection result indicates that the image area to be detected is an image area where a static mark is located, then determining M image areas in the reference image that match the image area to be detected, and determining N image areas in the current image that are around the image area to be detected, where M and N are positive integers;
[0007] Determining a characteristic parameter corresponding to each of the M image regions according to the current image and the reference image, and determining a characteristic parameter corresponding to each of the N image regions;
[0008] Based on one or more of the feature parameters corresponding to each of the M image areas and the feature parameters corresponding to each of the N image areas, a target detection result is determined to indicate whether the image area to be detected is the image area where the static mark is located.
[0009] In a second aspect, an embodiment of the present application further provides a static sign detection device, the device comprising:
[0010] A detection module is used to perform an initial detection on the image area to be detected in the current image to obtain an initial detection result;
[0011] a processing module, configured to determine M image regions in a reference image that match the image region to be detected, and determine N image regions in the current image that are around the image region to be detected, if the initial detection result indicates that the image region to be detected is an image region where a static mark is located, wherein M and N are positive integers;
[0012] The processing module is further used to determine the characteristic parameters corresponding to each of the M image regions according to the current image and the reference image, and to determine the characteristic parameters corresponding to each of the N image regions;
[0013] The processing module is also used to determine a target detection result indicating whether the image area to be detected is the image area where the static mark is located based on one or more of the feature parameters corresponding to each of the M image areas and the feature parameters corresponding to each of the N image areas.
[0014] In a third aspect, an embodiment of the present application further provides an intelligent terminal, comprising a processor and a memory, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method described in the first aspect.
[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, comprising: the computer-readable storage medium stores one or more instructions, and the one or more instructions are suitable for being loaded by a processor and executing the method described in the first aspect.
[0016] Implementing the embodiments of the present application has the following beneficial effects: performing an initial detection on the image area to be detected in the current image to obtain an initial detection result; if the initial detection result indicates that the image area to be detected is the image area where the static mark is located, then determining M image areas in the reference image that match the image area to be detected, and determining N image areas in the current image that are around the image area to be detected; then determining the feature parameters corresponding to each of the M image areas according to the current image and the reference image, and determining the feature parameters corresponding to each of the N image areas; finally, determining whether the image area to be detected is the target detection result of the image area where the static mark is located according to one or more of the feature parameters corresponding to each of the M image areas and each of the N image areas. It can be seen that the static mark detection method in the embodiments of the present application can accurately detect the static mark in the image screen, avoid misjudgment during static mark detection, and further improve the efficiency of image interpolation calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 is a flowchart of a first static sign detection method provided by an exemplary embodiment of the present application;
[0019] Figure 2a is a schematic diagram of determining a reference image provided by an exemplary embodiment of the present application;
[0020] Figure 2b is a schematic diagram of positions of M image regions in a reference image provided by an exemplary embodiment of the present application;
[0021] Figure 2c is a schematic diagram of positions of N image regions in a current image provided by an exemplary embodiment of the present application;
[0022] Figure 2d is another schematic diagram of positions of N image regions in a current image provided by an exemplary embodiment of the present application;
[0023] Figure 2e is another schematic diagram of positions of M image regions in a reference image provided by an exemplary embodiment of the present application;
[0024] Figure 3is a flow chart of a second static sign detection method provided by an exemplary embodiment of the present application;
[0025] Figure 4a is a schematic diagram of determining whether the image area to be detected is the image area where the static mark is located according to the ratio of the first number and M provided by an exemplary embodiment of the present application;
[0026] Figure 4b is a schematic diagram of determining whether the image area to be detected is the image area where the static mark is located according to the ratio of the second number to N, provided by an exemplary embodiment of the present application;
[0027] Figure 4c It is a schematic diagram of determining whether the image area to be detected is the image area where the static mark is located according to the first number, M, the second number and N, provided by an exemplary embodiment of the present application;
[0028] Figure 5 is a flowchart of a third static sign detection method provided by an exemplary embodiment of the present application;
[0029] Figure 6a is a schematic diagram of positions of X image regions in a current image provided by an exemplary embodiment of the present application;
[0030] Figure 6b is another schematic diagram of positions of X image regions in the current image provided by an exemplary embodiment of the present application;
[0031] Figure 7 is a structural schematic diagram of a static sign detection device provided by an exemplary embodiment of the present application;
[0032] Figure 8 It is a structural diagram of a smart terminal provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0035] The embodiment of the present application involves motion estimation and motion compensation technology, which is a technology for interpolation using motion estimation and motion compensation. Specifically, the basic idea of motion estimation is to divide each frame of an image sequence into many non-overlapping macroblocks, and assume that the displacement of all pixels in the macroblock is the same, and then find the block that is most similar to the current block within a given specific search range of each macroblock to the reference frame according to certain matching criteria, that is, the matching block. The relative displacement between the matching block and the current block is the motion vector, that is, the process of obtaining the motion vector is called motion estimation; motion compensation is to predict and compensate the current local image through the previous local image, and it is an effective method to reduce redundant information in the frame sequence. Finally, when interpolating frames through motion estimation and motion compensation technology, moving objects and static objects can be detected, thereby removing the residual image of the previous frame image, improving the dynamic clarity, and reducing the image tailing to a level that is difficult for the human eye to perceive.
[0036] The present application embodiment is based on the fact that the static mark detection in the process of interpolation by motion estimation and motion compensation technology is not accurate enough, and an exemplary static mark detection method is proposed. Figure 1 , Figure 1 1 is a flow chart of a first static sign detection method provided by an exemplary embodiment of the present application. The method is executed by an intelligent terminal, which may include intelligent mobile terminals such as mobile phones, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as intelligent fixed terminals such as digital TVs and desktop computers. The method includes:
[0037] S101, performing initial detection on the image area to be detected in the current image to obtain an initial detection result.
[0038] In the embodiment of the present application, the current image may refer to the current frame image, and the image area to be detected refers to an image of any area in the current image, which may be an image block of a*b pixels in size, where a and b are positive integers. The specific sizes of a and b may be determined according to actual conditions, such as 3*3, 6*8, etc. An initial detection is performed on the image area to be detected in the current image, and the initial detection result may be obtained by segmenting the current image and the reference image into blocks (blocks of the size of the image area to be detected), and detecting static marks based on the blocks; calculating the local features of each block, and the local features include: SIFT features (Scale-Invariant Feature Transform), SURF features (Speeded UpRobust Features), HOG (Histogram of Oriented Gradients, directional gradient histogram) features, or any local feature algorithm used to describe the particularity of the block; compare the local feature descriptors of the block at the same position of the current image and the reference image, and use the distance of the local feature descriptors to measure the similarity of the block between the two images, and the similarity judgment includes: the sum of the absolute values of the pixel value differences, the higher the similarity, the greater the possibility that the corresponding block is a static mark; if the number of times the similarity of the block at the corresponding position on the continuous time axis is greater than or equal to the similarity threshold reaches a first threshold, then an initial detection result indicating that the block is in the area where the static mark is located is obtained, and if the number of times the similarity of the block at the corresponding position is less than the similarity threshold reaches a second threshold, then an initial detection result indicating that the block is not in the area where the static mark is located is obtained. It can be understood that the similarity threshold, the first threshold, the second threshold, etc. in the embodiments of the present application can be determined specifically according to actual conditions.
[0039] Optionally, taking the local feature as the HOG feature as an example, the process of detecting whether the image area to be detected is the area where the static mark is located is: dividing the image area to be detected and the matching image area at the same position in the reference image into blocks; respectively calculating the gradient amplitudes of each direction of each block in the image area to be detected and the gradient amplitudes of each direction of each block in the matching image area; adding the gradient amplitudes of each direction of each block in the image area to be detected to obtain a total A, and adding the gradient amplitudes of each direction of each block in the matching image area to obtain a total B; judging whether A is greater than or equal to a first amplitude threshold, whether B is greater than or equal to a second amplitude threshold, whether the sum of A and B is greater than or equal to a third amplitude threshold, and whether the absolute value of the difference between A and B is less than or equal to a fourth amplitude threshold. If the results of these four judgment conditions are all yes, it is judged that the image area to be detected is very similar to the matching image area; then, in a continuous time, detecting whether the number of times that the results of all the above four judgment conditions are yes in the areas at the same position in each image is greater than or equal to a number threshold, thereby obtaining an initial detection result.
[0040] It should be understood that, in an optional implementation, the reference image in the embodiment of the present application may be a frame image before the current frame image. In an optional implementation, the reference image is obtained based on the two adjacent frames before the current image. Specifically, the two adjacent frames before the current image are obtained, and the two adjacent frames before the current image are filtered to obtain the reference image. The filtering process may be filtering the two adjacent frames before the current image through a recursive filter to obtain a new image, namely the reference image, such as Figure 2a As shown, the current image is taken as the third frame image, and the two adjacent frames before the current image are the first frame image and the second frame image, and the reference image is obtained after filtering processing.
[0041] S102. If the initial detection result indicates that the image area to be detected is the image area where the static mark is located, determine M image areas in the reference image that match the image area to be detected, and determine N image areas in the current image that are around the image area to be detected.
[0042] In the embodiment of the present application, the M image regions in the reference image that match the image region to be detected are the M image regions surrounding the image region in the reference image at the same position as the image region to be detected in the current image, such as Figure 2b As shown in FIG. 1 , the position of the matching image area in the reference image is the same as the position of the image area to be detected in the current image, and the M image areas are image areas around the matching image area (which can be 24 image block areas other than the matching image area in a 5*5 block centered on the matching image area). The N image areas around the image area to be detected in the current image are as follows: Figure 2cAs shown in FIG. 1 , the other 24 image block areas except the image area to be detected in the 5*5 block centered on the image area to be detected are the image areas around the image area to be detected in the current image. It should be understood that the 5*5 blocks in the embodiment of the present application are only exemplary data. Optionally, the determination of the surrounding image area may not be centered on the matching image area or the image area to be detected (e.g. Figure 2d The size of the surrounding blocks and the size of M and N can be determined according to the actual situation (as shown in Figure 2e shown).
[0043] S103: Determine a characteristic parameter corresponding to each of the M image regions according to the current image and the reference image, and determine a characteristic parameter corresponding to each of the N image regions.
[0044] In the embodiment of the present application, the feature parameters include motion vector parameters and similarity parameters. It should be noted that the motion vector parameters refer to the relative displacement between the matching area and the current area, and the similarity parameters refer to the similarity between the matching area and the current area. Specifically, in the embodiment of the present application, the motion vector parameter corresponding to each image area in the M image areas may refer to the relative displacement between each image area in the M image areas of the reference image and the image area matching in the current image, that is, the motion vector; the motion vector parameter corresponding to each image area in the N image areas may refer to the relative displacement between each image area in the N image areas of the current image and the image area matching in the reference image. In the embodiment of the present application, the similarity parameter corresponding to each image area in the M image areas may refer to the sum of the absolute values of the pixel value differences between each image area in the M image areas and the image area matching in the current image (Sum of Absolute Differences, SAD); the similarity parameter corresponding to each image area in the N image areas refers to the sum of the absolute values of the pixel value differences between each image area in the N image areas and the image area matching in the reference image.
[0045] S104. Determine a target detection result indicating whether the image area to be detected is the image area where the static mark is located based on one or more of the feature parameters corresponding to each of the M image areas and the feature parameters corresponding to each of the N image areas.
[0046] In an embodiment of the present application, a target detection result indicating whether the image area to be detected is the image area where a static mark is located is determined based on one or more of the relative displacement between each image area in the M image areas of the reference image and the image area that matches the current image, the relative displacement between each image area in the N image areas of the current image and the image area that matches the reference image, the sum of the absolute values of the pixel value differences between each image area in the M image areas and the image area that matches the current image, and the sum of the absolute values of the pixel value differences between each image area in the N image areas and the image area that matches the reference image.
[0047] In an embodiment of the present application, if the initial detection result indicates that the image area to be detected is the image area where the static mark is located, then determine M image areas in the reference image that match the image area to be detected, and determine N image areas in the current image that are around the image area to be detected; then determine the feature parameters corresponding to each of the M image areas based on the current image and the reference image, and determine the feature parameters corresponding to each of the N image areas; finally, determine the target detection result of whether the image area to be detected is the image area where the static mark is located based on one or more of the feature parameters corresponding to each of the M image areas and each of the N image areas. It can be seen that the embodiment of the present application further judges the static mark based on the initial detection result to obtain the target detection result, thereby accurately and effectively detecting the static mark in the image screen, avoiding misjudgment during static mark detection, and thereby improving the efficiency of image interpolation calculation.
[0048] See also Figure 3 , Figure 3 : is a flow chart of a second static sign detection method provided by an exemplary embodiment of the present application, the method is executed by an intelligent terminal, the intelligent terminal may include intelligent mobile terminals such as mobile phones, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., and intelligent fixed terminals such as digital TVs and desktop computers, the method comprising:
[0049] S301: Perform an initial detection on the image area to be detected in the current image to obtain an initial detection result.
[0050] S302: If the initial detection result indicates that the image area to be detected is the image area where the static mark is located, determine M image areas in the reference image that match the image area to be detected, and determine N image areas in the current image that are around the image area to be detected.
[0051] S303: Determine a characteristic parameter corresponding to each of the M image regions according to the current image and the reference image, and determine a characteristic parameter corresponding to each of the N image regions.
[0052] It should be noted that steps S301-S303 in the embodiment of the present application may specifically refer to steps S101-S103 in the above embodiment, and will not be described in detail in the embodiment of the present application.
[0053] S304: Determine, according to the characteristic parameter corresponding to each of the M image regions, a first number of image regions whose characteristic parameters are less than or equal to a preset value among the M image regions.
[0054] In an embodiment of the present application, based on the motion vector parameters and / or similarity parameters corresponding to each image area in the M image areas, a first number of image areas in the M image areas whose motion vector parameters and / or similarity parameters are less than or equal to a preset value is determined. In an optional embodiment, based on the first number and M, a target detection result indicating whether the image area to be detected is an image area where a static mark is located is determined. In an embodiment of the present application, if the sum of the absolute values of the relative displacement and / or pixel value difference between an image area in the M image areas and the image area matching in the current image is less than or equal to a preset threshold, then the image area is determined to be an image area where a static mark is located, and then the number of image areas in the M image areas where the static mark is located (the first number) can be determined, and based on M and the first number, a target detection result indicating whether the image area to be detected is an image area where a static mark is located is determined.
[0055] In an optional embodiment, determining the target detection result indicating whether the image area to be detected is the image area where the static mark is located based on the first number and M may include: calculating the ratio of the first number and M; when the ratio of the first number and M is greater than or equal to a first preset ratio, obtaining the target detection result indicating that the image area to be detected is the image area where the static mark is located; when the ratio of the first number and M is less than the first preset ratio, obtaining the target detection result indicating that the image area to be detected is not the image area where the static mark is located. In an embodiment of the present application, whether the image area to be detected is the image area where the static mark is located is determined based on the ratio of the first number and M. For example, if Figure 4aAs shown, there are 24 image areas around the matching image area (the image area in the reference image at the same position as the image area to be detected in the current image), the first preset ratio is 0.75, and 19 image areas are detected as image areas where static marks are located. Since 19 / 24 is greater than 0.75, the image area to be detected is also the image area where the static mark is located. It should be noted that the preset thresholds and preset values in this application are determined according to actual conditions and are not specifically limited in the embodiments of this application.
[0056] In an optional embodiment, based on the motion vector parameters corresponding to each of the M image areas, a first number of image areas among the M image areas whose motion vector parameters are less than or equal to a first preset value is determined; based on the first number and M, a target detection result is determined to indicate whether the image area to be detected is the image area where a static mark is located.
[0057] In the embodiment of the present application, based on the relative displacement between each image area in the M image areas of the reference image and the image area matched in the current image, it is determined whether there is an image area in the M image areas whose corresponding relative displacement is less than or equal to a first preset value. If so, the image area is determined to be the image area where the static mark is located, and then the number (first number) of the image areas determined as the image areas where the static mark is located in the M image areas is determined, and the target detection result indicating whether the image area to be detected is the image area where the static mark is located is determined based on the first number and M. Specifically, based on the ratio of the first number to M, it can be determined whether the image area to be detected is the image area where the static mark is located.
[0058] In an optional embodiment, based on the similarity parameters corresponding to each of the M image areas, a first number of image areas among the M image areas whose similarity parameters are less than or equal to a second preset value is determined; based on the first number and M, a target detection result is determined to indicate whether the image area to be detected is the image area where the static mark is located.
[0059] In the embodiment of the present application, based on the sum of the absolute values of the pixel value differences between each image area in the M image areas of the reference image and the image area matched in the current image, it is determined whether there is an image area in the M image areas whose absolute value of the pixel value difference corresponding to the image area is less than or equal to a second preset value. If so, the image area is determined to be the image area where the static mark is located, and then the number (first number) of the image areas determined to be the image areas where the static mark is located in the M image areas is determined, and the target detection result indicating whether the image area to be detected is the image area where the static mark is located is determined based on the first number and M. Specifically, it can be determined whether the image area to be detected is the image area where the static mark is located based on the ratio of the first number to M.
[0060] S305 . Determine, according to the characteristic parameter corresponding to each of the N image regions, a second number of image regions whose characteristic parameters are less than or equal to a preset value.
[0061] In an embodiment of the present application, based on the motion vector parameters and / or similarity parameters corresponding to each of the N image areas, a second number of image areas in the N image areas whose motion vector parameters and / or similarity parameters are less than or equal to a preset value is determined. In an optional embodiment, based on the second number and N, a target detection result indicating whether the image area to be detected is an image area where a static mark is located is determined. In an embodiment of the present application, if the sum of the absolute values of the relative displacement and / or pixel value difference between an image area in the N image areas and the image area matched in the reference image is less than or equal to a preset threshold, then the image area is determined to be an image area where a static mark is located, and then the number of image areas in the N image areas where the static mark is located (the second number) can be determined, and based on N and the second number, a target detection result indicating whether the image area to be detected is an image area where a static mark is located is determined.
[0062] In an optional embodiment, the determination of the target detection result indicating whether the image area to be detected is the image area where the static mark is located based on the second number and N may include: calculating the ratio of the second number and N; when the ratio of the second number and N is greater than or equal to the second preset ratio, obtaining the target detection result indicating that the image area to be detected is the image area where the static mark is located; when the ratio of the second number and N is less than the second preset ratio, obtaining the target detection result indicating that the image area to be detected is not the image area where the static mark is located. The second preset ratio is determined according to actual conditions, such as 0.88, 0.92, 1, etc., and is not specifically limited in the embodiments of the present application. In the embodiments of the present application, whether the image area to be detected is the image area where the static mark is located is determined based on the ratio of the second number to N. For example, if Figure 4b As shown, there are 24 image areas around the image area to be detected, the second preset ratio is 0.85, and 21 image areas are detected as image areas where static marks are located. 21 / 24 is greater than 0.85, and the image area to be detected is also the image area where the static mark is located. It should be noted that the preset threshold and preset value in this application are determined according to actual conditions and are not specifically limited in the embodiments of this application.
[0063] In an optional embodiment, based on the motion vector parameters corresponding to each of the N image areas, a second number of image areas among the N image areas whose motion vector parameters are less than or equal to a third preset value is determined; based on the second number and N, a target detection result is determined to indicate whether the image area to be detected is the image area where the static mark is located.
[0064] In the embodiment of the present application, based on the relative displacement between each image area in the N image areas of the current image and the image area matched in the reference image, it is determined whether there is an image area in the N image areas whose corresponding relative displacement is less than or equal to the third preset value. If so, the image area is determined to be the image area where the static mark is located, and then the number (second number) of the image areas determined as the image areas where the static mark is located in the N image areas is determined, and the target detection result indicating whether the image area to be detected is the image area where the static mark is located is determined based on the second number and N. Specifically, it can be determined whether the image area to be detected is the image area where the static mark is located based on the ratio of the second number to N.
[0065] In an optional embodiment, based on the similarity parameters corresponding to each of the N image areas, a second number of image areas in the N image areas whose similarity parameters are less than or equal to a fourth preset value is determined; based on the second number and N, a target detection result is determined to indicate whether the image area to be detected is the image area where the static mark is located.
[0066] In the embodiment of the present application, according to the sum of the absolute values of the pixel value differences between each image area in the N image areas of the current image and the image area matched in the reference image, it is determined whether there is an image area in the N image areas where the sum of the absolute values of the pixel value differences corresponding to the image area is less than or equal to a fourth preset value, and if so, the image area is determined to be the image area where the static mark is located, and then the number (second number) of the image areas determined to be the image areas where the static mark is located in the N image areas is determined, and the target detection result indicating whether the image area to be detected is the image area where the static mark is located is determined according to the second number and N. Specifically, whether the image area to be detected is the image area where the static mark is located can be determined according to the ratio of the second number to N.
[0067] It should be noted that the execution order of steps S304 and S305 in the embodiment of the present application is not unique, and any step can be executed first or simultaneously.
[0068] S306. Determine, according to the first number, M, the second number, and N, a target detection result indicating whether the image area to be detected is the image area where the static mark is located.
[0069] In an optional embodiment, the determining of the target detection result indicating whether the image area to be detected is the image area where the static mark is located based on the first number, the M, the second number and N may include: calculating the ratio of the first number and M, and calculating the ratio of the second number and N; determining the target detection result indicating whether the image area to be detected is the image area where the static mark is located based on the ratio of the first number and the M, and the ratio of the second number and the N. In the embodiment of the present application, the target detection result indicating whether the image area to be detected is the image area where the static mark is located is determined based on whether the ratio of the first number and M is greater than or equal to a certain ratio, and whether the ratio of the second number and the N is greater than or equal to a certain ratio. In an optional embodiment, the determination of the target detection result indicating whether the image area to be detected is the image area where a static mark is located based on the ratio of the first number and the M, and the ratio of the second number and the N, may include: when the ratio of the first number and the M is greater than or equal to a first preset ratio, and the ratio of the second number and the N is greater than or equal to a second preset ratio, obtaining the target detection result indicating that the image area to be detected is the image area where a static mark is located; when the ratio of the first number and the M is less than the first preset ratio, or the ratio of the second number and the N is less than the second preset ratio, obtaining the target detection result indicating that the image area to be detected is not the image area where a static mark is located. For example, if Figure 4c As shown, M is 48, N is 48, the first preset ratio is 0.9, the second preset ratio is 0.9, the first number is 45, the second number is 46, the ratio of the first number to M is 45 / 48, which is greater than the first preset ratio of 0.9, and the ratio of the second number to N is 46 / 48, which is greater than the second preset ratio of 0.9. Therefore, the target detection result is determined to indicate that the image area to be detected is the image area where the static mark is located.
[0070] In an embodiment of the present application, if the initial detection result indicates that the image area to be detected is the image area where the static mark is located, then M image areas in the reference image that match the image area to be detected are determined, and N image areas in the current image that are around the image area to be detected are determined; based on the characteristic parameters corresponding to each of the M image areas, the first number of image areas in the M image areas whose characteristic parameters are less than or equal to a preset value is determined; based on the characteristic parameters corresponding to each of the N image areas, the second number of image areas in the N image areas whose characteristic parameters are less than or equal to a preset value is determined; based on the first number, M, the second number and N, the target detection result indicating whether the image area to be detected is the image area where the static mark is located is determined. It can be seen that in the embodiment of the present application, it is possible to detect whether the initial detection result is accurate, that is, to accurately determine whether the image area to be detected is the image area where the static mark is located, prevent the edge area of the object from being judged as the image area where the static mark is located, improve the accuracy of static mark detection, and further improve the efficiency of image interpolation processing.
[0071] See also Figure 5 , Figure 5 : is a flow chart of a third static sign detection method provided by an exemplary embodiment of the present application, the method is executed by an intelligent terminal, the intelligent terminal may include intelligent mobile terminals such as mobile phones, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., and intelligent fixed terminals such as digital TVs and desktop computers, the method comprising:
[0072] S501: Perform an initial detection on the image area to be detected in the current image to obtain an initial detection result.
[0073] It should be noted that step S501 in the embodiment of the present application may specifically refer to step S101 in the above embodiment, and will not be described in detail in the embodiment of the present application.
[0074] S502: If the initial detection result indicates that the image region to be detected is not the image region where the static mark is located, obtain a target detection result for each of the X image regions surrounding the image region to be detected in the current image.
[0075] In the embodiment of the present application, the X image regions around the image region to be detected in the current image may be m*n-1 image block regions centered on the image region to be detected (eg Figure 6a As shown in FIG. 1 , it is also possible to have p*q-1 image block areas not centered on the image area to be detected (such as Figure 6b As shown) wherein m, n, p and q are positive integers. In the embodiment of the present application, when the initial detection result indicates that the image area to be detected is not the image area where the static mark is located, in order to prevent misjudgment, the target detection result of each image area in the X image areas around the detection image area in the current image is obtained at this time, and then whether the image area to be detected is the image area where the static mark is located is determined according to the target detection result of each image area, wherein X is a positive integer. It should be noted that in the embodiment of the present application, the size of X may be the same as or different from the size of M and N mentioned above.
[0076] S503 : Determine the number of image regions in the X image regions where the static mark is located according to the target detection result of each of the X image regions.
[0077] In the embodiment of the present application, the number of image regions where the target detection results indicate that the static mark is located in the X image regions is counted, and whether the image to be detected is the image region where the static mark is located is determined according to the number of image regions.
[0078] S504: According to the number of image regions and X, determine a target detection result indicating whether the image region to be detected is the image region where the static mark is located.
[0079] In the embodiment of the present application, the ratio of the number of image regions to X can be calculated, and the target detection result indicating whether the image region to be detected is the image region where the static mark is located is determined according to the ratio. Specifically, if the ratio of the number of image regions to X is greater than or equal to the third preset ratio, the target detection result indicating that the image region to be detected is the image region where the static mark is located is determined, and if the ratio of the number of image regions to X is less than the third preset ratio, the target detection result indicating that the image region to be detected is not the image region where the static mark is located is determined.
[0080] In an embodiment of the present application, an initial detection is performed on an image area to be detected in a current image to obtain an initial detection result. If the initial detection result indicates that the image area to be detected is not an image area where a static mark is located, a target detection result of each image area in X image areas surrounding the image area to be detected in the current image is obtained; the number of image areas in the X image areas that are image areas where static marks are located is determined according to the target detection result of each image area in the X image areas; and the target detection result indicating whether the image area to be detected is an image area where a static mark is located is determined according to the number of image areas and X. Therefore, when the image area to be detected is mistakenly judged not to be an image area where a static mark is located, whether the image area to be detected is an image area where a static mark is located can be accurately determined according to the number of image areas and X of the X image areas surrounding the image to be detected that are image areas where static marks are located, thereby improving the efficiency and accuracy of static mark detection.
[0081] Figure 7 This is a schematic diagram of a static sign detection device provided by an exemplary embodiment of the present application, which can be mounted on the intelligent terminal in the above method embodiment, and the intelligent terminal can specifically be a server. Of course, in some embodiments, it can also be mounted on a terminal device. Figure 7 The static sign detection device shown can be used to perform the above Figure 1 , Figure 3 and Figure 5 Part or all of the functions of the method embodiments described. The detailed description of each part is as follows:
[0082] The detection module 701 is used to perform initial detection on the image area to be detected in the current image to obtain an initial detection result;
[0083] A processing module 702 is used to determine M image regions in the reference image that match the image region to be detected, and determine N image regions in the current image that are around the image region to be detected, if the initial detection result indicates that the image region to be detected is an image region where a static mark is located, wherein M and N are positive integers;
[0084] The processing module 702 is further configured to determine a feature parameter corresponding to each of the M image regions according to the current image and the reference image, and to determine a feature parameter corresponding to each of the N image regions;
[0085] The processing module 702 is also used to determine a target detection result indicating whether the image area to be detected is the image area where the static mark is located based on one or more of the feature parameters corresponding to each of the M image areas and the feature parameters corresponding to each of the N image areas.
[0086] In an optional embodiment, the processing module 702 can be specifically used to determine a first number of image areas whose characteristic parameters are less than or equal to a preset value among the M image areas based on the characteristic parameters corresponding to each of the M image areas; and is also used to determine, based on the first number and M, a target detection result indicating whether the image area to be detected is the image area where a static mark is located.
[0087] In an optional embodiment, the processing module 702 is specifically used to calculate the ratio of the first number and M; and is also used to obtain a target detection result indicating that the image area to be detected is an image area where a static mark is located when the ratio of the first number and M is greater than or equal to a first preset ratio; and is also used to obtain a target detection result indicating that the image area to be detected is not an image area where a static mark is located when the ratio of the first number and M is less than the first preset ratio.
[0088] In an optional embodiment, the processing module 702 is further used to determine, based on the characteristic parameters corresponding to each of the N image regions, a second number of image regions in the N image regions whose characteristic parameters are less than or equal to a preset value. In an optional embodiment, the processing module 702 is further used to determine, based on the first number, M, the second number and N, a target detection result indicating whether the image region to be detected is an image region where a static mark is located. In an optional embodiment, the processing module 702 is further used to calculate the ratio of the first number to M, and calculate the ratio of the second number to N; and to determine, based on the ratio of the first number to M, and the ratio of the second number to N, a target detection result indicating whether the image region to be detected is an image region where a static mark is located.
[0089] In an optional embodiment, the processing module 702 is also used to obtain a target detection result indicating that the image area to be detected is an image area where a static mark is located when the ratio of the first number to the M is greater than or equal to a first preset ratio, and the ratio of the second number to the N is greater than or equal to a second preset ratio; when the ratio of the first number to the M is less than the first preset ratio, or the ratio of the second number to the N is less than the second preset ratio, to obtain a target detection result indicating that the image area to be detected is not an image area where a static mark is located.
[0090] In an optional implementation, the device may further include an acquisition module 703, wherein the acquisition module 703 is configured to acquire a target detection result of each of X image regions surrounding the image region to be detected in the current image when the initial detection result indicates that the image region to be detected is not the image region where the static mark is located, where X is a positive integer;
[0091] The processing module 702 is further configured to determine the number of image regions among the X image regions that are image regions where static marks are located according to the target detection result of each image region among the X image regions; and is further configured to determine, according to the number of image regions and X, a target detection result indicating whether the image region to be detected is an image region where a static mark is located.
[0092] In an optional implementation, the acquisition module 703 is further used to acquire the two adjacent frames of the current image; the processing module 702 is further used to filter the two adjacent frames of the current image to obtain the reference image.
[0093] Figure 7 The various modules in the static sign detection device shown can be respectively or completely merged into one or several other modules to constitute, or one (some) of the modules can also be split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above modules are divided based on logical functions. In practical applications, the function of a module can also be realized by multiple modules, or the functions of multiple modules can be realized by one module. In other embodiments of the present application, the static sign detection device can also include other modules. In practical applications, these functions can also be implemented with the assistance of other modules, and can be implemented by the collaboration of multiple modules.
[0094] Based on the same inventive concept, the principles and beneficial effects of solving the problems by the static sign detection device provided in the embodiment of the present application are similar to the principles and beneficial effects of solving the problems by the static sign detection method in the method embodiment of the present application. Please refer to the principles and beneficial effects of the implementation of the method. For the sake of concise description, they will not be repeated here.
[0095] See also Figure 8 , Figure 8 801 is a schematic diagram of a structure of an intelligent terminal provided by an exemplary embodiment of the present application. The terminal includes a processor 801 and a memory 802, and the processor 801 and the memory 802 are connected via one or more communication buses. The processor 801 is configured to support the intelligent terminal to execute Figure 1 , Figure 3 and Figure 5 The corresponding function in the method. The processor 801 can be a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof.
[0096] The memory 802 is used to store program codes, etc. The memory 802 may include a volatile memory (volatile memory), such as a random access memory (random access memory, RAM); the memory 802 may also include a non-volatile memory (non-volatile memory), such as a read-only memory (read-only memory, ROM), a flash memory (flash memory), a hard disk drive (hard disk drive, HDD) or a solid-state drive (solid-state drive, SSD); the memory 802 may also include a combination of the above-mentioned types of memory.
[0097] In the embodiment of the present application, the processor 801 may call the program code stored in the memory 802 to perform the following operations:
[0098] Performing initial detection on the image area to be detected in the current image to obtain an initial detection result;
[0099] If the initial detection result indicates that the image area to be detected is an image area where a static mark is located, then determining M image areas in the reference image that match the image area to be detected, and determining N image areas in the current image that are around the image area to be detected, where M and N are positive integers;
[0100] Determining a characteristic parameter corresponding to each of the M image regions according to the current image and the reference image, and determining a characteristic parameter corresponding to each of the N image regions;
[0101] Based on one or more of the feature parameters corresponding to each of the M image areas and the feature parameters corresponding to each of the N image areas, a target detection result is determined to indicate whether the image area to be detected is the image area where the static mark is located.
[0102] In an optional embodiment, the processor 801 determines the target detection result indicating whether the image area to be detected is the image area where the static mark is located based on the feature parameters corresponding to each of the M image areas and one or more of the feature parameters corresponding to each of the N image areas, which may include: determining a first number of image areas in the M image areas whose feature parameters are less than or equal to a preset value based on the feature parameters corresponding to each of the M image areas; and determining, based on the first number and M, the target detection result indicating whether the image area to be detected is the image area where the static mark is located.
[0103] In an optional embodiment, the processor 801 determines, based on the first number and M, a target detection result indicating whether the image area to be detected is an image area where a static mark is located, which may include: calculating the ratio of the first number and M; when the ratio of the first number and M is greater than or equal to a first preset ratio, obtaining a target detection result indicating that the image area to be detected is an image area where a static mark is located; when the ratio of the first number and M is less than the first preset ratio, obtaining a target detection result indicating that the image area to be detected is not an image area where a static mark is located.
[0104] In an optional implementation, before the processor 801 determines the target detection result indicating whether the image area to be detected is the image area where the static mark is located based on the first number and M, it also includes: determining the second number of image areas in the N image areas whose feature parameters are less than or equal to a preset value based on the feature parameters corresponding to each of the N image areas; the processor 801 determines the target detection result indicating whether the image area to be detected is the image area where the static mark is located based on the first number and M, which may include: determining the target detection result indicating whether the image area to be detected is the image area where the static mark is located based on the first number, M, the second number and N; the processor 801 determines the target detection result indicating whether the image area to be detected is the image area where the static mark is located based on the first number, M, the second number and N, which may include: calculating the ratio of the first number and M, and calculating the ratio of the second number and N; determining the target detection result indicating whether the image area to be detected is the image area where the static mark is located based on the ratio of the first number and M, and the ratio of the second number and N.
[0105] In an optional embodiment, the processor 801 determines the target detection result indicating whether the image area to be detected is the image area where a static mark is located based on the ratio of the first number and the M, and the ratio of the second number and the N, which may include: when the ratio of the first number and the M is greater than or equal to a first preset ratio, and the ratio of the second number and the N is greater than or equal to a second preset ratio, obtaining the target detection result indicating that the image area to be detected is the image area where a static mark is located; when the ratio of the first number and the M is less than the first preset ratio, or the ratio of the second number and the N is less than the second preset ratio, obtaining the target detection result indicating that the image area to be detected is not the image area where a static mark is located.
[0106] In an optional implementation, when the initial detection result indicates that the image area to be detected is not the image area where the static mark is located, the processor 801 obtains a target detection result of each of the X image areas surrounding the image area to be detected in the current image, where X is a positive integer; determines the number of image areas among the X image areas that are image areas where the static mark is located, when the initial detection result indicates that the image area to be detected is not the image area where the static mark is located; and determines a target detection result indicating whether the image area to be detected is the image area where the static mark is located, based on the number of image areas and X.
[0107] In an optional implementation, the processor 801 obtains the two adjacent previous image frames of the current image; and performs filtering processing on the two adjacent previous image frames to obtain the reference image.
[0108] The present application also provides a computer-readable storage medium that can be used to store the Figure 1 , Figure 3 and Figure 5 The computer program instructions of the image data storage method in the illustrated embodiment, the above-mentioned computer readable storage medium is not limited to a flash memory, a hard disk, and a solid state drive.
[0109] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0110] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted by a computer-readable storage medium. The computer instructions can be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk (SSD)), etc.
[0111] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A static sign detection method, characterized in that: include: Performing initial detection on the image area to be detected in the current image to obtain an initial detection result; If the initial detection result indicates that the image area to be detected is an image area where a static mark is located, then determining M image areas in the reference image that match the image area to be detected, and determining N image areas in the current image that are around the image area to be detected, where M and N are positive integers; Determining a characteristic parameter corresponding to each of the M image regions according to the current image and the reference image, and determining a characteristic parameter corresponding to each of the N image regions; wherein the characteristic parameters include motion vector parameters and / or similarity parameters; Determining, according to one or more of the characteristic parameters corresponding to each of the M image regions and the characteristic parameters corresponding to each of the N image regions, a target detection result indicating whether the image region to be detected is an image region where a static mark is located, comprising: determining, according to the characteristic parameters corresponding to each of the M image regions, a first number of image regions in the M image regions whose characteristic parameters are less than or equal to a preset value, and determining, according to the first number and M, a target detection result indicating whether the image region to be detected is an image region where a static mark is located; and / or, determining, based on the characteristic parameters corresponding to each of the N image regions, a second number of image regions in the N image regions whose characteristic parameters are less than or equal to a preset value, and determining, based on N and the second number, a target detection result indicating whether the image region to be detected is an image region where a static mark is located; And / or, based on the first number, the M, the second number and the N, determine a target detection result indicating whether the image area to be detected is the image area where the static mark is located.
2. The method according to claim 1, characterized in that The determining, according to the first number and M, a target detection result indicating whether the image area to be detected is an image area where a static mark is located, includes: Calculating a ratio of the first number to M; When the ratio of the first number to the M is greater than or equal to a first preset ratio, a target detection result is obtained for indicating that the image area to be detected is an image area where a static mark is located; When the ratio of the first number to the M is less than the first preset ratio, a target detection result is obtained, which indicates that the image area to be detected is not the image area where the static mark is located.
3. The method according to claim 1, characterized in that The determining, according to the first number, M, the second number, and N, a target detection result indicating whether the image area to be detected is an image area where a static mark is located, includes: Calculating a ratio of the first number to M, and calculating a ratio of the second number to N; According to the ratio of the first number to the M and the ratio of the second number to the N, a target detection result indicating whether the image area to be detected is the image area where the static mark is located is determined.
4. The method according to claim 3, characterized in that The determining, according to the ratio of the first number to the M and the ratio of the second number to the N, a target detection result indicating whether the image area to be detected is an image area where a static mark is located, includes: When the ratio of the first number to the M is greater than or equal to a first preset ratio, and the ratio of the second number to the N is greater than or equal to a second preset ratio, a target detection result indicating that the image area to be detected is an image area where a static mark is located is obtained; When the ratio of the first number to the M is less than the first preset ratio, or the ratio of the second number to the N is less than the second preset ratio, a target detection result is obtained indicating that the image area to be detected is not the image area where the static mark is located.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If the initial detection result indicates that the image area to be detected is not the image area where the static mark is located, obtaining a target detection result of each image area in X image areas around the image area to be detected in the current image, where X is a positive integer; Determine the number of image regions in the X image regions that are image regions where static marks are located according to the target detection result of each of the X image regions; According to the number of image regions and X, a target detection result indicating whether the image region to be detected is an image region where a static mark is located is determined.
6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Acquire the two previous adjacent frames of the current image; The two adjacent frames of images are filtered to obtain the reference image.
7. A static sign detection device, characterized in that: include: A detection module is used to perform an initial detection on the image area to be detected in the current image to obtain an initial detection result; a processing module, configured to determine M image regions in a reference image that match the image region to be detected, and determine N image regions in the current image that are around the image region to be detected, if the initial detection result indicates that the image region to be detected is an image region where a static mark is located, wherein M and N are positive integers; The processing module is further used to determine a characteristic parameter corresponding to each of the M image regions according to the current image and the reference image, and to determine a characteristic parameter corresponding to each of the N image regions; wherein the characteristic parameters include motion vector parameters and / or similarity parameters; The processing module is further used to determine, based on one or more of the characteristic parameters corresponding to each of the M image regions and the characteristic parameters corresponding to each of the N image regions, a target detection result indicating whether the image region to be detected is an image region where a static mark is located. The processing module is specifically used to determine, based on the characteristic parameters corresponding to each of the M image regions, a first number of image regions in the M image regions whose characteristic parameters are less than or equal to a preset value, and, based on the first number and M, determine a target detection result indicating whether the image region to be detected is an image region where a static mark is located; and / or, based on the characteristic parameters corresponding to each of the N image regions, determine a second number of image regions in the N image regions whose characteristic parameters are less than or equal to a preset value, and, based on N and the second number, determine a target detection result indicating whether the image region to be detected is an image region where a static mark is located; and / or, based on the first number, the M, the second number and the N, determine a target detection result indicating whether the image region to be detected is an image region where a static mark is located.
8. An intelligent terminal, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores one or more instructions, and the one or more instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 6.
