Image region marking correction method, device, equipment and computer readable medium

By obtaining the initial monitoring image and video frame collection, generating masks and images to be matched, performing pixel point matching mark correction processing, and performing distortion correction, the problem of low accuracy of area mark correction caused by changes in the position of the monitoring device is solved, and the problem of low accuracy of area mark correction caused by changes in the monitoring device is improved. Accuracy of area marking.

CN118351288BActive Publication Date: 2024-11-22ADDX (BEIJING) TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410455262.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-16
Publication Date
2024-11-22
Estimated Expiration
2044-04-16

AI Technical Summary

Technical Problem

In the prior art, when monitoring the position of the equipment, the accuracy of image area mark correction is low. It is mainly due to the unchanged shape of the rectangular frame and the absence of distortion processing, resulting in low accuracy of pixel point correspondence relationship, which in turn affects the accuracy of area marking.

Method used

By obtaining the initial monitoring image, generating mask maps and area mark position information, obtaining monitoring video frame sets based on system time, generating images to be matched, performing pixel point matching mark correction processing, and performing distortion correction and background removal when necessary, updating pixels value to improve the accuracy of area marking.

Benefits of technology

The accuracy of the corrected area marking is improved, the effect of shape changes and distortion of rectangular frames is reduced, the accuracy of pixel point correspondence is enhanced, and the correction effect of area marking is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118351288B_ABST
    Figure CN118351288B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose an image area mark correction method, device, equipment and computer-readable medium. A specific implementation of the method includes: obtaining an initial surveillance image; generating a mask image and area mark position information; executing the following correction steps: obtaining the date in the system time as the current date; obtaining a set of surveillance video frames within a preset time period in the current date; generating a surveillance image to be matched; determining the difference value between the surveillance image to be matched and the initial surveillance image as the target difference value; executing pixel matching mark correction processing to obtain an area mark correction image and correction mark position information; displaying the area mark correction image on a preset interface; storing the correction mark position information in a preset storage device; obtaining the system time as the current time; and executing the correction steps again. This implementation improves the accuracy of image area marking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to an image region marking correction method, apparatus, device, and computer-readable medium. Background Art

[0002] With the development of technologies such as the Internet of Things, big data, and artificial intelligence, monitoring equipment (for example, rechargeable monitoring cameras) has been widely used. When a monitoring device is taken down for charging and then put back, or when the monitoring device becomes loose and causes a slight change in position, the region of interest displayed by the region of interest marker in the image captured by the monitoring device will change. Image region marker correction is a technology for correcting region markers in monitoring images. At present, when correcting region markers in monitoring images, the method usually adopted is: the user manually moves a rectangular frame at a fixed position to the region of interest in the image as a corrected region marker, or directly corrects the region marker in the monitoring image captured after the monitoring device position changes based on the pixel correspondence between the monitoring image captured before the monitoring device position changes and the monitoring image captured after the monitoring device position changes.

[0003] However, when the above method is used to correct the image area mark, the following technical problems often occur:

[0004] First, the user manually moves a rectangular box at a fixed position to the area of ​​interest in the monitoring image as a corrected area marker. When the position of the monitoring device changes, the shape of the rectangular box used to mark the area of ​​interest does not change. The preset area of ​​interest is not necessarily a rectangular area. The area of ​​interest displayed in the rectangular box in the monitoring image is quite different from the preset area of ​​interest, resulting in low accuracy of the corrected area marker.

[0005] Second, the area markings in the monitoring images collected after the monitoring device position changes are corrected directly based on the correspondence between the pixels of the monitoring images collected before the monitoring device position changes and the pixels of the monitoring images collected after the monitoring device position changes. Since the change in the monitoring device position may cause distortion in the collected image (distortion may cause problems such as deformation of straight lines in the image, bending of image edges, or stretching of the center of the image), the monitoring images collected after the monitoring device position changes are not distorted or background removed before the area markings are corrected, resulting in low accuracy in the determined pixel correspondence, which in turn leads to low accuracy in the area markings after correction based on the pixel correspondence.

[0006] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention

[0007] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to mark the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0008] Some embodiments of the present disclosure provide an image region marking correction method, an apparatus, an electronic device, and a computer-readable medium to solve one or more of the technical problems mentioned in the above background technology section.

[0009] In a first aspect, some embodiments of the present disclosure provide an image area marking correction method, the method comprising: obtaining an initial surveillance image; based on the initial surveillance image, generating a mask map and area marking position information corresponding to the initial surveillance image; based on the area marking position information and the mask map, performing the following correction steps: obtaining a date in the system time as the current date; obtaining a set of surveillance video frames within a preset time period in the current date, wherein each surveillance video frame in the set of surveillance video frames has an area marking; generating a surveillance image to be matched based on the initial surveillance image and the set of surveillance video frames; and calculating a difference value between the surveillance image to be matched and the initial surveillance image. Determine as a target difference value; in response to determining that the above target difference value is greater than a preset threshold, perform pixel matching mark correction processing according to the above surveillance image to be matched, the above area mark position information, the above mask image and the above initial surveillance image, and obtain the area mark correction image and the correction mark position information corresponding to the above surveillance image to be matched; display the above area mark correction image on a preset interface; store the above correction mark position information to a preset storage device; in response to determining that the above target difference value is less than or equal to the above preset threshold, obtain the system time as the current time; after the preset duration of the above current time, perform the above correction step again according to the above area mark position information and the above mask image.

[0010] In a second aspect, some embodiments of the present disclosure provide an image area mark correction device, the device comprising: an acquisition unit, configured to acquire an initial surveillance image; a generation unit, configured to generate a mask map and area mark position information corresponding to the initial surveillance image based on the initial surveillance image; a correction unit, configured to perform the following correction steps based on the area mark position information and the mask map: acquiring a date in the system time as the current date; acquiring a set of surveillance video frames within a preset time period in the current date, wherein each surveillance video frame in the set of surveillance video frames has an area mark; generating a surveillance image to be matched based on the initial surveillance image and the set of surveillance video frames; and matching the surveillance image to be matched. The difference value with the above-mentioned initial monitoring image is determined as the target difference value; in response to determining that the above-mentioned target difference value is greater than the preset threshold value, according to the above-mentioned monitoring image to be matched, the above-mentioned area mark position information, the above-mentioned mask image and the above-mentioned initial monitoring image, a pixel matching mark correction process is performed to obtain the area mark correction image and the correction mark position information corresponding to the above-mentioned monitoring image to be matched; the above-mentioned area mark correction image is displayed on a preset interface; the above-mentioned correction mark position information is stored in a preset storage device; in response to determining that the above-mentioned target difference value is less than or equal to the above-mentioned preset threshold value, the system time is obtained as the current time; after the preset duration of the above-mentioned current time, according to the above-mentioned area mark position information and the above-mentioned mask image, the above-mentioned correction step is performed again.

[0011] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.

[0012] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.

[0013] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the image area mark correction method of some embodiments of the present disclosure, the accuracy of the corrected area mark is improved. Specifically, the reason for the low accuracy of the corrected area mark is that: a rectangular frame at a fixed position is manually moved by the user to the area of ​​interest in the monitoring image as the corrected area mark. When the position of the monitoring device changes, the shape of the rectangular frame used to mark the area of ​​interest does not change. The preset area of ​​interest is not necessarily a rectangular area. The area of ​​interest displayed in the rectangular frame in the monitoring image is quite different from the preset area of ​​interest, resulting in low accuracy of the corrected area mark. Based on this, the image area mark correction method of some embodiments of the present disclosure first obtains an initial monitoring image. Thus, the initial monitoring image can be obtained. Then, based on the above initial monitoring image, a mask map and area mark position information corresponding to the above initial monitoring image are generated. Thus, the mask map and area mark position information for correction processing can be obtained. Afterwards, according to the above area mark position information and the above mask map, the following correction steps are performed: the first step is to obtain the date in the system time as the current date. The second step is to obtain a set of surveillance video frames within a preset time period of the current date, wherein each surveillance video frame in the surveillance video frame set has a region mark. Thus, a surveillance video frame set for generating a surveillance image to be matched can be obtained. Afterwards, a surveillance image to be matched is generated based on the initial surveillance image and the surveillance video frame set. Then, the difference value between the surveillance image to be matched and the initial surveillance image is determined as the target difference value. Thus, a target difference value for determining whether to perform a mark correction process can be obtained. Next, in response to determining that the target difference value is greater than a preset threshold, a pixel matching mark correction process is performed based on the surveillance image to be matched, the region mark position information, the mask image and the initial surveillance image to obtain a region mark correction image and a correction mark position information corresponding to the surveillance image to be matched. Thus, a pixel matching mark correction process can be performed when the target difference value is greater than a preset threshold to obtain a region mark correction image and a correction mark position information. The region mark is corrected by pixel matching mark correction processing, and pixel matching is performed on the basis of the region mark position information, the initial monitoring image, and the monitoring image to be matched, thereby reducing the difference between the region of interest corresponding to the corrected mark position information in the region mark correction image and the preset region of interest in the initial monitoring image, thereby improving the accuracy of the corrected region mark. The above target difference value being greater than the preset threshold value can indicate that the position of the monitoring device has changed. Then, the above region mark correction image is displayed on a preset interface. Thus, the region mark correction image can be displayed. Thereafter, the above correction mark position information is stored in a preset storage device. In response to determining that the above target difference value is less than or equal to the above preset threshold value, the system time is obtained as the current time. Thus, the system time that changes in real time can be obtained.Then, after the preset duration of the current time, the correction step is performed again according to the region mark position information and the mask image. Also, when the target difference value is greater than the preset threshold, the pixel matching mark correction process is performed according to the monitoring image to be matched, the region mark position information, the mask image and the initial monitoring image, and the region mark is corrected by the pixel matching mark correction process. Pixel matching is performed on the basis of the region mark position information, the initial monitoring image and the monitoring image to be matched, and the difference between the region of interest corresponding to the correction mark position information in the region mark correction image and the preset region of interest in the initial monitoring image is reduced, thereby improving the accuracy of the corrected region mark. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0015] Figure 1 is a flow chart of some embodiments of the image region marking correction method according to the present disclosure;

[0016] Figure 2 is a schematic structural diagram of some embodiments of the image region marking correction device according to the present disclosure;

[0017] Figure 3 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0019] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0020] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0021] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0022] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0023] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0024] Figure 1 The process 100 of some embodiments of the image region mark correction method according to the present disclosure is shown. The image region mark correction method comprises the following steps:

[0025] Step 101, obtaining an initial monitoring image.

[0026] In some embodiments, the execution subject (e.g., a computing device) of the image area mark correction method may obtain an initial monitoring image from a preset database via a wired connection or a wireless connection. The initial monitoring image may be an image captured by a monitoring device (e.g., a rechargeable monitoring camera) at a preset installation position. In practice, the execution subject obtains the initial monitoring image from a preset database. The preset installation position may be a position where the monitoring device is fixed. For example, the preset installation position may be an entrance or exit of a building. The preset database may be a MySQL database for storing images captured by the monitoring device. The execution subject may be a video surveillance server that corrects the area mark in the monitoring image. The area mark may be each pixel point whose pixel value at the boundary of the area of ​​interest in the monitoring video frame is a preset value.

[0027] It should be noted that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0028] Step 102: Generate a mask image and region mark position information corresponding to the initial monitoring image according to the initial monitoring image.

[0029] In some embodiments, the execution entity may generate a mask image and area marking position information corresponding to the initial monitoring image based on the initial monitoring image.

[0030] In some optional implementations of some embodiments, the execution subject may generate a mask image and region mark position information corresponding to the initial surveillance image according to the initial surveillance image through the following steps:

[0031] In the first step, the initial monitoring image is displayed on the region mark position information generation interface, wherein the region mark position information generation interface may be a page for generating region mark position information through interface interaction.

[0032] In the second step, in response to detecting a selection operation on at least one pixel in the initial surveillance image displayed on the region mark position information generation interface, the at least one pixel is determined as each target pixel. The selection operation may be a click and slide operation in the region mark position information generation interface displayed on the screen of the computing device. The selection operation may also be an operation of selecting by clicking a mouse.

[0033] In the third step, the coordinates of the target pixels in the initial monitoring image are determined as initial area mark position information.

[0034] The fourth step is to create a blank mask image of the same size as the initial monitoring image. In practice, first, the execution subject can call the PIL (Python Image Library) library to create a binary image of the same size as the initial monitoring image and the pixel value of each pixel is (0, 0, 0). Then, the execution subject can determine the binary image as a blank mask image.

[0035] In the fifth step, the image region corresponding to the initial region mark position information in the blank mask image is determined as the target image region, wherein the image region may be a connected region surrounded by the coordinates included in the initial region mark position information.

[0036] In the sixth step, the pixel value of each pixel in the target image area in the blank mask image is determined as a preset value to update the blank mask image. The preset value may be (1, 1, 1).

[0037] In the seventh step, the updated blank mask image is determined as the mask image corresponding to the initial monitoring image.

[0038] In the eighth step, the mask image is subjected to contour detection processing to obtain initial contour detection information corresponding to the mask image. In practice, the execution subject may perform contour detection on the mask image through a contour detection algorithm based on the findContours function to obtain initial contour detection information corresponding to the mask image. The initial contour detection information may represent the contour of the region of interest in the mask image. The initial contour detection information may include the coordinates of each pixel point.

[0039] In the ninth step, based on the initial contour detection information, simplified contour detection information corresponding to the initial contour detection information is generated. In practice, the execution subject may simplify the initial contour detection information by a polygonal approximation algorithm based on the Douglas–Peucker algorithm (also known as the Larmer-Douglas-Peucker algorithm, iterative adaptive point algorithm, split and merge algorithm) to obtain simplified contour detection information.

[0040] Step 10: Display the contour corresponding to the simplified contour detection information in the displayed initial monitoring image. In practice, the execution subject may use a filling function to determine the pixel value of each pixel point corresponding to the simplified contour detection information in the displayed initial monitoring image as a preset value to display the contour corresponding to the simplified contour detection information.

[0041] Step 11: Display the generation control and the modification control at the preset position in the above-mentioned area mark position information generation interface. The above-mentioned generation control can be an interface element for determining the generated area mark position information. The above-mentioned modification control can be an interface element for regenerating the area mark position information.

[0042] In step 12, in response to detecting a selection operation acting on the above-mentioned generation control, the above-mentioned simplified contour detection information is determined as area mark position information.

[0043] Step 103, according to the region mark position information and the mask image, perform the following correction steps:

[0044] Step 1031, obtaining the date in the system time as the current date.

[0045] In some embodiments, the execution entity may obtain a date in the system time as the current date.

[0046] Step 1032, obtaining a set of surveillance video frames within a preset time period on the current date.

[0047] In some embodiments, the execution subject may obtain a set of surveillance video frames within a preset time period on the current date. In practice, the execution subject may obtain a set of surveillance video frames within a preset time period from a preset database. Each surveillance video frame in the surveillance video frame set has an area mark. The area mark may be each pixel point whose pixel value at the boundary of the region of interest in the surveillance video frame is a preset value. Each pixel point whose pixel value is a preset value may constitute the boundary of the region of interest in the surveillance video frame.

[0048] Step 1033: Generate a surveillance image to be matched based on the initial surveillance image and the surveillance video frame set.

[0049] In some embodiments, the execution entity may generate a surveillance image to be matched based on the initial surveillance image and the surveillance video frame set.

[0050] In some optional implementations of some embodiments, the execution subject may generate a surveillance image to be matched according to the initial surveillance image and the surveillance video frame set through the following steps:

[0051] The first step is to determine the above initial monitoring image as the background image.

[0052] In the second step, for each surveillance video frame in the above surveillance video frame set, perform the following steps:

[0053] The first sub-step is to generate a differential image based on the background image and the monitoring video frame. In practice, the execution subject may grayscale the background image to obtain a grayscale background image corresponding to the background image. Then, the execution subject may grayscale the monitoring video frame to obtain a grayscale monitoring video frame corresponding to the monitoring video frame. Next, the execution subject may perform a differential process on the grayscale monitoring video frame and the grayscale background image to obtain a differential image.

[0054] The second sub-step is to determine each pixel point in the difference image that meets a preset condition as a target difference pixel point set, wherein the preset condition may be that the absolute value corresponding to the pixel value of the pixel point is greater than or equal to a preset value.

[0055] In a third sub-step, the number of each target differential pixel point included in the target differential pixel point set is determined as the number of pixels of the moving object.

[0056] The fourth sub-step is to determine the image area of ​​the background image as the target image area. The image area may be the product of the length and width of the image. For example, the length of the image may be 10 cm, the width of the image may be 5 cm, and the area of ​​the image may be 10 cm×5 cm=50 square centimeters.

[0057] In a fifth sub-step, the number of pixels in the background image is determined as the number of background pixels.

[0058] The sixth sub-step is to generate the area of ​​the moving object in the monitoring video frame according to the number of pixels of the moving object, the number of pixels of the background and the area of ​​the target image. In practice, first, the execution subject may determine the ratio of the number of pixels of the moving object to the number of pixels of the background as a first value. Then, the execution subject may determine the product of the first value and the area of ​​the target image as the area of ​​the moving object in the monitoring video frame.

[0059] The seventh sub-step is to determine the area of ​​the moving object in the monitoring video frame as the moving object image area.

[0060] The third step is to determine the determined moving object image areas as a moving object image area set, wherein one moving object image area in the moving object image area set corresponds to one monitoring video frame in the monitoring video frame set.

[0061] In the fourth step, the moving object image area that meets the preset screening condition in the moving object image area set is determined as the screening moving object image area. The screening condition may be that the moving object image area has the smallest value.

[0062] In the fifth step, the surveillance video frame corresponding to the above-screened moving object image area in the surveillance video frame set is determined as the surveillance image to be matched.

[0063] Step 1034: determine the difference value between the surveillance image to be matched and the initial surveillance image as the target difference value.

[0064] In some embodiments, the execution entity may determine the difference value between the monitoring image to be matched and the initial monitoring image as the target difference value. The difference value may be the sum of squares of the difference values ​​of each pixel value. Each of the pixel value difference values ​​may be the difference between the first pixel value of the pixel point in the monitoring image to be matched and the second pixel value of the corresponding pixel point in the initial monitoring image. The first pixel value may be the average of the three-channel pixel values ​​of the pixel point in the monitoring image to be matched. The second pixel value may be the average of the three-channel pixel values ​​of the pixel point in the initial monitoring image.

[0065] In some optional implementations of some embodiments, before determining the difference value between the monitoring image to be matched and the initial monitoring image as the target difference value, the execution subject may further perform the following steps:

[0066] The first step is, in response to receiving the power change notification information sent by the preset power monitoring device, performing pixel matching mark correction processing according to the above-mentioned monitoring image to be matched, the above-mentioned area mark position information, the above-mentioned mask image and the above-mentioned initial monitoring image, to obtain the area mark correction image and the correction mark position information corresponding to the above-mentioned monitoring image to be matched. Among them, the above-mentioned preset power monitoring device can be a power sensor device. The above-mentioned power change notification information can be information representing the change of power from low to high. It should be noted that the above-mentioned power change notification information can be information sent non-real time, and the above-mentioned power change notification information can be information sent during a preset time period within the current date.

[0067] The second step is to display the above-mentioned area marked corrected image on the preset interface.

[0068] The third step is to store the above-mentioned correction mark position information in the above-mentioned preset storage device.

[0069] Step 1035, in response to determining that the target difference value is greater than a preset threshold, pixel matching mark correction processing is performed based on the surveillance image to be matched, the area mark position information, the mask image and the initial surveillance image to obtain the area mark corrected surveillance image and the corrected mark position information corresponding to the surveillance image to be matched.

[0070] In some embodiments, the above-mentioned execution entity can respond to determining that the above-mentioned target difference value is greater than a preset threshold value, and perform pixel matching mark correction processing according to the above-mentioned monitoring image to be matched, the above-mentioned area mark position information, the above-mentioned mask image and the above-mentioned initial monitoring image to obtain the area mark correction image and correction mark position information corresponding to the above-mentioned monitoring image to be matched.

[0071] In some optional implementations of some embodiments, the execution subject may perform pixel matching mark correction processing according to the surveillance image to be matched, the region mark position information, the mask image and the initial surveillance image through the following steps to obtain the region mark correction image and the correction mark position information corresponding to the surveillance image to be matched:

[0072] The first step is to perform image correction and filtering processing on the monitoring image to be matched according to the mask image to obtain a matching monitoring image corresponding to the monitoring image to be matched.

[0073] In the second step, feature point information extraction is performed on the initial monitoring image to obtain an initial monitoring image feature point information set corresponding to the initial monitoring image. In practice, the execution subject may perform feature point information extraction on the initial monitoring image through a feature point extraction algorithm to obtain an initial monitoring image feature point information set. The feature point extraction algorithm includes but is not limited to one of the following: SIFT (Scale-Invariant Feature Transform) algorithm, ORB (Oriented FAST and Rotated BRIEF) algorithm. The feature point information of the initial monitoring image in the feature point information set may represent information of feature points in the initial monitoring image. The feature point information of the initial monitoring image in the feature point information set may include but is not limited to at least one of the following: feature point position information, feature point scale information, and descriptor information. The feature point position information may be the position coordinates of the feature point in the image. The feature point scale information may represent the feature point scale (i.e., it describes the size of the area around the feature point). The descriptor information may be a vector or matrix representing features around the feature point.

[0074] The third step is to perform feature point information extraction processing on the above-mentioned matching surveillance image to obtain a matching surveillance image feature point information set corresponding to the above-mentioned matching surveillance image. In practice, the above-mentioned execution entity can perform feature point information extraction processing on the above-mentioned matching surveillance image through a feature point extraction algorithm to obtain a matching surveillance image feature point information set corresponding to the above-mentioned matching surveillance image. Among them, the matching surveillance image feature point information in the above-mentioned matching surveillance image feature point information set can represent the information of the feature points in the initial surveillance image. The above-mentioned matching surveillance image feature point information may include but is not limited to at least one of the following: feature point location information, feature point scale information, and descriptor information.

[0075] The fourth step is to perform feature point information matching processing on the initial monitoring image feature point information set and the matching monitoring image feature point information set to obtain each matching feature point information group.

[0076] Step 5: Generate geometric transformation information based on the above-mentioned matching feature point information groups. In practice, first, the above-mentioned execution subject can use the least square method to solve the transformation matrix based on the above-mentioned matching feature point information groups. Then, the above-mentioned execution subject can determine the above-mentioned transformation matrix as geometric transformation information. The above-mentioned transformation matrix can be, but is not limited to, one of the following: perspective transformation matrix, radiation transformation matrix.

[0077] The sixth step is to generate the corrected mark position information corresponding to the above-mentioned area mark position information according to the above-mentioned geometric transformation information and the above-mentioned area mark position information. In practice, for each of the coordinates in the above-mentioned area mark position information, first, the above-mentioned execution entity may upgrade the above-mentioned coordinate to a coordinate in three-dimensional space, that is, determine the coordinate value of the dimension representing "high" as 1, and obtain the three-dimensional coordinate. Then, the above-mentioned execution entity may determine the product of the transformation matrix corresponding to the above-mentioned geometric transformation information and the above-mentioned three-dimensional coordinate as the corrected three-dimensional coordinate. Next, the above-mentioned execution entity may convert the above-mentioned corrected three-dimensional coordinate into a two-dimensional coordinate, that is, remove the coordinate of the dimension representing "high" in the three-dimensional coordinate, and obtain the corrected two-dimensional coordinate. Afterwards, the above-mentioned execution entity may determine each corrected two-dimensional coordinate obtained as the corrected mark position information. As an example, the above-mentioned coordinates may be (1, 2), and the transformation matrix corresponding to the above-mentioned geometric transformation information may be The above three-dimensional coordinates can be (1, 2, 1). Then Then the above-mentioned corrected three-dimensional coordinates can be (2, 3, 3), and the above-mentioned corrected two-dimensional coordinates can be (2, 3).

[0078] In the seventh step, the pixel value of each pixel point corresponding to the above-mentioned correction mark position information in the above-mentioned monitoring image to be matched is determined as a preset value to update the monitoring image to be matched. The above-mentioned preset value can be a pixel value that will present each pixel point corresponding to the correction mark position information with a preset color. For example, if each pixel point corresponding to the above-mentioned correction mark position information is to be presented in green, the above-mentioned preset value can be "(0, 255, 0)".

[0079] In the eighth step, the updated surveillance image to be matched is determined as the region marking corrected image.

[0080] In some optional implementations of some embodiments, the execution subject may perform feature point information matching processing on the initial surveillance image feature point information set and the matching surveillance image feature point information set through the following steps to obtain each matching feature point information group:

[0081] The first step is to input the above-mentioned initial monitoring image feature point information set into the feature extraction layer of the pre-trained feature point matching prediction model to obtain the first feature vector set, wherein the above-mentioned feature point matching prediction model includes the above-mentioned feature extraction layer, the cross-feature association layer, the correlation weight information screening layer, and the output layer. The above-mentioned feature point matching prediction model can be a neural network model that takes the initial monitoring image feature point information set and the matching monitoring image feature point information set as input and each matching feature point information group as output. For example, the above-mentioned neural network model can be a recurrent neural network (RNN) model. As an example, each matching feature point information group of each sample initial monitoring image feature point information set and the matching monitoring image feature point information set corresponding to each sample in the multiple sample initial monitoring image feature point information sets and the matching monitoring image feature point information sets and each matching feature point information group of multiple samples can be obtained first. Then, each sample initial monitoring image feature point information set and matching monitoring image feature point information set in the multiple sample initial monitoring image feature point information sets and matching monitoring image feature point information sets are taken as input, and each matching feature point information group corresponding to each sample initial monitoring image feature point information set and matching monitoring image feature point information set in the multiple sample initial monitoring image feature point information sets and matching monitoring image feature point information sets is taken as the expected output, and the feature point matching prediction model is trained. An initial monitoring image feature point information in the above-mentioned initial monitoring image feature point information set corresponds to a first feature vector in the above-mentioned first feature vector set. Among them, the above-mentioned feature extraction layer can be a fully connected layer that takes the initial monitoring image feature point information or the matching monitoring image feature point information set as input information and takes the first feature vector set or the second feature vector set as output data. The first feature vector in the above-mentioned first feature vector set can represent the initial monitoring image feature point information corresponding to the initial monitoring image feature point information set. The above-mentioned first feature vector can be a vector representing the above-mentioned initial monitoring image feature point information.

[0082] In the second step, the matching surveillance image feature point information set is input into the feature extraction layer to obtain a second feature vector set, wherein a matching surveillance image feature point information in the matching surveillance image feature point information set corresponds to a second feature vector in the second feature vector set. The second feature vector in the second feature vector set may represent the matching surveillance image feature point information corresponding to the matching surveillance image feature point information set. The second feature vector may represent the vector of the matching surveillance image feature point information.

[0083] In the third step, the first feature vector set and the second feature vector set are input into the cross-feature association layer to obtain the correlation weight information representing the correlation weight between each first feature vector in the first feature vector set and each second feature vector in the second feature vector set. Among them, the cross-feature association layer can be an attention mechanism layer with the first feature vector set and the second feature vector set as input data and the correlation weight information as output data. The correlation weight can represent the similarity between the first feature vector and the first feature vector. The similarity can be the Euclidean distance or the cosine similarity. One of the correlation weight information can represent the similarity between a first feature vector in the first feature vector set and a second feature vector in the second feature vector set.

[0084] In the fourth step, each of the above-mentioned correlation weight information is input into the above-mentioned correlation weight information screening layer to obtain each of the screened correlation weight information, wherein one of the above-mentioned screened correlation weight information corresponds to an initial monitoring image feature point information in the above-mentioned initial monitoring image feature point information set and corresponds to a matching monitoring image feature point information in the matching monitoring image feature point information set. The above-mentioned correlation weight information screening layer can be an activation function layer that takes each of the correlation weight information as input data and each of the screened correlation weight information as output information. The above-mentioned each of the screened correlation weight information can be at least one of the correlation weight information whose corresponding value is greater than a preset value.

[0085] The fifth step is to input the above-mentioned various screening correlation weight information into the above-mentioned output layer to obtain various matching feature point information groups, wherein one matching feature point information group in the above-mentioned various matching feature point information groups includes an initial monitoring image feature point information and a matching monitoring image feature point information.

[0086] In some optional implementations of some embodiments, the execution subject may perform image correction and filtering processing on the surveillance image to be matched according to the mask image through the following steps to obtain a matching surveillance image corresponding to the surveillance image to be matched:

[0087] The first step is to obtain the internal parameter matrix and distortion coefficient of the acquisition device corresponding to the above-mentioned monitoring image to be matched from the preset database.

[0088] The second step is to create a distortion model based on the intrinsic parameter matrix and the distortion coefficient. In practice, the execution subject can call a function in an image processing library to create a distortion model based on the intrinsic parameter matrix and the distortion coefficient. The image processing library can be an OpenCV library.

[0089] The third step is to perform distortion correction processing on each pixel in the above-mentioned surveillance image to be matched according to the above-mentioned distortion model. In practice, the above-mentioned execution entity may determine the coordinate information of the above-mentioned pixel as the coordinate information to be converted. Then, the above-mentioned execution entity may determine the coordinate information of the center point pixel of the above-mentioned surveillance image to be matched as the center point coordinate information. Next, the above-mentioned execution entity may perform coordinate conversion processing on the above-mentioned center point coordinate information according to the above-mentioned distortion model to obtain the distortion correction coordinate information corresponding to the above-mentioned coordinate sub-information to be converted. Then, the above-mentioned execution entity may determine the coordinate information of the above-mentioned pixel as the above-mentioned distortion correction coordinate information to update the above-mentioned pixel.

[0090] In the fourth step, the monitoring image to be matched after the distortion correction processing of each pixel is determined as the corrected monitoring image to be matched.

[0091] In the fifth step, for each pixel of the to-be-matched rectified monitoring image in the to-be-matched rectified monitoring image, the following update steps are performed on the pixel of the to-be-matched rectified monitoring image according to the mask image:

[0092] Sub-step 1: determining the coordinate information of the pixel points of the monitoring image to be matched and corrected.

[0093] Sub-step 2: Determine the pixel point in the mask image corresponding to the above coordinate information as the mask pixel point.

[0094] Sub-step three: determining the pixel value of the pixel point of the above-mentioned monitoring image to be matched and corrected as the pixel value to be updated.

[0095] Sub-step four: determining the pixel value of the mask pixel point as the mask pixel value.

[0096] Sub-step 5: Generate an updated pixel value according to the mask pixel value and the pixel value to be updated. In practice, the execution subject may perform a bitwise AND operation on the mask pixel value and the pixel value to be updated to obtain an updated pixel value. As an example, the mask pixel value may be (0, 0, 0), the pixel value to be updated may be (120, 222, 1), and the updated pixel value may be (0, 0, 0).

[0097] Sub-step six: updating the pixel value of the pixel point of the above-mentioned to-be-matched rectified monitoring image to the updated pixel value, so as to update the pixel point of the above-mentioned to-be-matched rectified monitoring image.

[0098] In the sixth step, the to-be-matched rectified monitoring image after each pixel point of the to-be-matched rectified monitoring image is updated is determined as the matching monitoring image.

[0099] The above technical scheme and its related contents, as an inventive point of an embodiment of the present disclosure, solve the second technical problem mentioned in the background technology, which is "directly correcting the area mark in the monitoring image collected after the position of the monitoring device changes according to the correspondence between the pixel points of the monitoring image collected before the position of the monitoring device changes and the monitoring image collected after the position of the monitoring device changes. Since the change in the position of the monitoring device may cause distortion in the collected image (distortion may cause problems such as deformation of straight lines in the image, bending of image edges, or stretching of the center of the image), the monitoring image collected after the position of the monitoring device changes is not subjected to distortion processing and background removal processing before the area mark is corrected, resulting in low accuracy of the determined pixel point correspondence, and further resulting in low accuracy of the area mark after correction according to the pixel point correspondence". The factors that lead to the low accuracy of the corrected area mark are often as follows: directly correcting the area mark in the monitoring image collected after the position of the monitoring device changes according to the correspondence between the pixel points of the monitoring image collected before the position of the monitoring device changes and the monitoring image collected after the position of the monitoring device changes. Since the change in the position of the monitoring device may cause the collected image to be distorted (distortion may cause problems such as straight line deformation, image edge bending or image center stretching), the monitoring image collected after the change in the position of the monitoring device is not subjected to distortion processing and background removal processing before the regional mark is corrected, resulting in a low accuracy of the determined pixel correspondence relationship, and then resulting in a low accuracy of the regional mark after correction based on the pixel correspondence relationship. If the above factors are solved, the effect of improving the accuracy of the corrected regional mark can be achieved. In order to achieve this effect, first, the internal parameter matrix and distortion coefficient of the acquisition device corresponding to the above-mentioned monitoring image to be matched are obtained from a preset database. Then, a distortion model is created based on the above-mentioned internal parameter matrix and the above-mentioned distortion coefficient. Thus, a distortion model for distortion processing can be obtained. Then, according to the above-mentioned distortion model, each pixel in the above-mentioned monitoring image to be matched is subjected to distortion correction processing. Thus, each pixel in the monitoring image to be matched can be subjected to distortion correction processing, which reduces the probability of problems such as straight line deformation, image edge bending or image center stretching in the image, and makes the lines and object shapes in the monitoring image to be matched more real and accurate. Then, the monitoring image to be matched after the distortion correction processing of each pixel is determined as the monitoring image to be matched and corrected. In this way, a monitoring image to be matched and corrected with more realistic and accurate lines and object shapes can be obtained. In the fifth step, for each pixel of the monitoring image to be matched in the above-mentioned monitoring image to be matched and corrected, according to the above-mentioned mask map, the following update steps are performed on the pixel of the monitoring image to be matched and corrected: Sub-step 1, determine the coordinate information of the pixel of the monitoring image to be matched and corrected. In this way, the coordinate information for determining the mask pixel can be obtained.Sub-step 2, determine the pixel points corresponding to the above coordinate information in the mask image as mask pixels. Thus, the mask pixels used to determine the mask pixel values ​​can be obtained. Sub-step 3, determine the pixel values ​​of the above-mentioned pixels of the corrected monitoring image to be matched as the pixel values ​​to be updated. Sub-step 4, determine the pixel values ​​of the above-mentioned mask pixels as the mask pixel values. Sub-step 5, generate updated pixel values ​​based on the above-mentioned mask pixel values ​​and the above-mentioned pixel values ​​to be updated. Thus, the updated pixel values ​​used to update the pixels of the corrected monitoring image to be matched can be obtained. Sub-step 6, update the pixel values ​​of the above-mentioned pixels of the corrected monitoring image to be matched as the updated pixel values, so as to update the pixels of the above-mentioned corrected monitoring image to be matched. Thus, the background of the corrected monitoring image to be matched can be removed through the updating step. Finally, the corrected monitoring image to be matched after the pixels of each corrected monitoring image to be matched are determined as the matching monitoring image. This is also because the distortion processing and background removal processing are performed on the monitoring image to be matched. This makes the lines and object shapes in the surveillance image to be matched more realistic and accurate, while also reducing the interference of the background, so that the accuracy of each matching feature point information group (pixel point correspondence) determined later based on the surveillance image to be matched and the initial surveillance image is higher. Furthermore, the accuracy of the area marking corrected according to the pixel point correspondence is higher.

[0100] Step 1036, displaying the region-marked corrected image on a preset interface.

[0101] In some embodiments, the execution entity may display the region mark correction image on a preset interface, wherein the preset interface may be a page for displaying the region mark correction image.

[0102] Step 1037, storing the corrected mark position information in a preset storage device.

[0103] In some embodiments, the execution subject may store the correction mark position information in a preset storage device. For example, the preset storage device may be, but is not limited to, one of the following: a hard disk, a random access memory (RAM).

[0104] Step 1038, in response to determining that the target difference value is less than or equal to the preset threshold, obtaining the system time as the current time.

[0105] In some embodiments, the execution entity may obtain the system time as the current time in response to determining that the target difference value is less than or equal to the preset threshold.

[0106] Step 1039, after a preset duration of the current time, the correction step is performed again according to the area mark position information and the mask map.

[0107] In some embodiments, the execution entity may execute the correction step again according to the area mark position information and the mask image after a preset duration of the current time.

[0108] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through the image area mark correction method of some embodiments of the present disclosure, the accuracy of the corrected area mark is improved. Specifically, the reason for the low accuracy of the corrected area mark is that: a rectangular frame at a fixed position is manually moved by the user to the area of ​​interest in the monitoring image as the corrected area mark. When the position of the monitoring device changes, the shape of the rectangular frame used to mark the area of ​​interest does not change. The preset area of ​​interest is not necessarily a rectangular area. The area of ​​interest displayed in the rectangular frame in the monitoring image is quite different from the preset area of ​​interest, resulting in low accuracy of the corrected area mark. Based on this, the image area mark correction method of some embodiments of the present disclosure first obtains an initial monitoring image. Thus, the initial monitoring image can be obtained. Then, based on the above initial monitoring image, a mask map and area mark position information corresponding to the above initial monitoring image are generated. Thus, the mask map and area mark position information for correction processing can be obtained. Afterwards, according to the above area mark position information and the above mask map, the following correction steps are performed: the first step is to obtain the date in the system time as the current date. The second step is to obtain a set of surveillance video frames within a preset time period of the current date, wherein each surveillance video frame in the surveillance video frame set has a region mark. Thus, a surveillance video frame set for generating a surveillance image to be matched can be obtained. Afterwards, a surveillance image to be matched is generated based on the initial surveillance image and the surveillance video frame set. Then, the difference value between the surveillance image to be matched and the initial surveillance image is determined as the target difference value. Thus, a target difference value for determining whether to perform a mark correction process can be obtained. Next, in response to determining that the target difference value is greater than a preset threshold, a pixel matching mark correction process is performed based on the surveillance image to be matched, the region mark position information, the mask image and the initial surveillance image to obtain a region mark correction image and a correction mark position information corresponding to the surveillance image to be matched. Thus, a pixel matching mark correction process can be performed when the target difference value is greater than a preset threshold to obtain a region mark correction image and a correction mark position information. The region mark is corrected by pixel matching mark correction processing, and pixel matching is performed on the basis of the region mark position information, the initial monitoring image, and the monitoring image to be matched, thereby reducing the difference between the region of interest corresponding to the corrected mark position information in the region mark correction image and the preset region of interest in the initial monitoring image, thereby improving the accuracy of the corrected region mark. The above target difference value being greater than the preset threshold value can indicate that the position of the monitoring device has changed. Then, the above region mark correction image is displayed on a preset interface. Thus, the region mark correction image can be displayed. Thereafter, the above correction mark position information is stored in a preset storage device. In response to determining that the above target difference value is less than or equal to the above preset threshold value, the system time is obtained as the current time. Thus, the system time that changes in real time can be obtained.Then, after the preset duration of the current time, the correction step is performed again according to the region mark position information and the mask image. Also, when the target difference value is greater than the preset threshold, the pixel matching mark correction process is performed according to the monitoring image to be matched, the region mark position information, the mask image and the initial monitoring image, and the region mark is corrected by the pixel matching mark correction process. Pixel matching is performed on the basis of the region mark position information, the initial monitoring image and the monitoring image to be matched, and the difference between the region of interest corresponding to the correction mark position information in the region mark correction image and the preset region of interest in the initial monitoring image is reduced, thereby improving the accuracy of the corrected region mark.

[0109] Further references Figure 2 As an implementation of the methods shown in the figures, the present disclosure provides some embodiments of an image region mark correction device, and these device embodiments are Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0110] like Figure 2 As shown, the image region mark correction device 200 of some embodiments includes: an acquisition unit 201, a generation unit 202 and a correction unit 203. The acquisition unit 201 is configured to acquire an initial surveillance image; the generation unit 202 is configured to generate a mask map and region mark position information corresponding to the initial surveillance image according to the initial surveillance image; the correction unit 203 is configured to perform the following correction steps according to the region mark position information and the mask map: acquiring the date in the system time as the current date; acquiring a set of surveillance video frames within a preset time period in the current date, wherein each surveillance video frame in the set of surveillance video frames has a region mark; generating a surveillance image to be matched according to the initial surveillance image and the set of surveillance video frames; and converting the difference value between the surveillance image to be matched and the initial surveillance image into a value; obtaining a surveillance image to be matched according to the initial surveillance image and the set of surveillance video frames; and obtaining a surveillance image to be matched according to the difference value between the surveillance image to be matched and the initial surveillance image. Determine as a target difference value; in response to determining that the above target difference value is greater than a preset threshold, perform pixel matching mark correction processing according to the above surveillance image to be matched, the above area mark position information, the above mask image and the above initial surveillance image, and obtain the area mark correction image and the correction mark position information corresponding to the above surveillance image to be matched; display the above area mark correction image on a preset interface; store the above correction mark position information to a preset storage device; in response to determining that the above target difference value is less than or equal to the above preset threshold, obtain the system time as the current time; after the preset duration of the above current time, perform the above correction step again according to the above area mark position information and the above mask image.

[0111] It is understood that the units described in the device 200 are similar to those described in the reference Figure 1Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 200 and the units contained therein, and will not be described in detail here.

[0112] Reference below Figure 3 , which shows a structural schematic diagram of an electronic device 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0113] like Figure 3 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0114] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0115] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the functions defined in the method of some embodiments of the present disclosure are executed.

[0116] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0117] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0118] The computer-readable medium may be included in the electronic device; or it may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains an initial surveillance image; generates a mask map and area mark position information corresponding to the initial surveillance image based on the initial surveillance image; performs the following correction steps based on the area mark position information and the mask map: obtains the date in the system time as the current date; obtains a set of surveillance video frames within a preset time period in the current date, wherein each surveillance video frame in the set of surveillance video frames has an area mark; generates a surveillance image to be matched based on the initial surveillance image and the set of surveillance video frames; compares the surveillance image to be matched with the initial surveillance image. The difference value is determined as a target difference value; in response to determining that the above target difference value is greater than a preset threshold, pixel matching mark correction processing is performed according to the above monitoring image to be matched, the above area mark position information, the above mask image and the above initial monitoring image to obtain the area mark corrected monitoring image and the corrected mark position information corresponding to the above monitoring image to be matched; the above area mark corrected monitoring image is displayed on a preset interface; the above corrected mark position information is stored in a preset storage device; in response to determining that the above target difference value is less than or equal to the above preset threshold, the system time is obtained as the current time; after a preset duration of the above current time, the above correction step is performed again according to the above area mark position information and the above mask image.

[0119] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0120] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0121] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The units described may also be provided in a processor, for example, may be described as: a processor including an acquisition unit, a generation unit, and a correction unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the generation unit may also be described as "a unit for generating, based on the above-mentioned initial monitoring image, a mask map and area marking position information corresponding to the above-mentioned initial monitoring image".

[0122] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0123] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of technical features, but should also cover other technical solutions formed by any combination of technical features or their equivalent features without departing from the inventive concept. For example, a technical solution formed by replacing the features with (but not limited to) the technical features with similar functions disclosed in the embodiments of the present disclosure.

Claims

1. A method for correcting image region marking, comprising: Acquire an initial monitoring image; According to the initial monitoring image, generating a mask image and region marking position information corresponding to the initial monitoring image; According to the area mark position information and the mask image, the following correction steps are performed: Get the date in the system time as the current date; Acquire a set of surveillance video frames within a preset time period on the current date, wherein each surveillance video frame in the set of surveillance video frames has a region mark; Generate a monitoring image to be matched according to the initial monitoring image and the monitoring video frame set; Determine a difference value between the monitoring image to be matched and the initial monitoring image as a target difference value; In response to determining that the target difference value is greater than a preset threshold, a pixel matching mark correction process is performed according to the surveillance image to be matched, the area mark position information, the mask map, and the initial surveillance image to obtain a region mark correction image and correction mark position information corresponding to the surveillance image to be matched, wherein the pixel matching mark correction process is performed according to the surveillance image to be matched, the area mark position information, the mask map, and the initial surveillance image to obtain a region mark correction image and correction mark position information corresponding to the surveillance image to be matched, including: According to the mask image, performing image correction and filtering processing on the monitoring image to be matched, to obtain a matching monitoring image corresponding to the monitoring image to be matched; Performing feature point information extraction processing on the initial monitoring image to obtain an initial monitoring image feature point information set corresponding to the initial monitoring image; Performing feature point information extraction processing on the matching monitoring image to obtain a matching monitoring image feature point information set corresponding to the matching monitoring image; Performing feature point information matching processing on the initial monitoring image feature point information set and the matching monitoring image feature point information set to obtain each matching feature point information group; Generate geometric transformation information according to each matching feature point information group; generating, according to the geometric transformation information and the area mark position information, corrected mark position information corresponding to the area mark position information; Determine the pixel value of each pixel point corresponding to the correction mark position information in the monitoring image to be matched as a preset value, so as to update the monitoring image to be matched; Determine the updated monitoring image to be matched as the region marking corrected image; Displaying the region-marked corrected image on a preset interface; Storing the correction mark position information in a preset storage device; In response to determining that the target difference value is less than or equal to the preset threshold, acquiring system time as the current time; After a preset duration of the current time, the correction step is performed again according to the area mark position information and the mask image.

2. The method according to claim 1, wherein: The step of generating a mask image and region mark position information corresponding to the initial monitoring image according to the initial monitoring image includes: Displaying the initial monitoring image on the area mark position information generation interface; In response to detecting a selection operation acting on at least one pixel point in the initial monitoring image displayed on the region mark position information generation interface, determining the at least one pixel point as each target pixel point; Determine each coordinate of each target pixel point in the initial monitoring image as initial area mark position information; Creating a blank mask image of the same size as the initial monitoring image; Determine an image region in the blank mask image corresponding to the initial region mark position information as a target image region; Determining the pixel value of each pixel point in the target image area in the blank mask image as a preset value to update the blank mask image; Determining the updated blank mask image as the mask image corresponding to the initial monitoring image; Performing contour detection processing on the mask image to obtain initial contour detection information corresponding to the mask image; generating simplified contour detection information corresponding to the initial contour detection information according to the initial contour detection information; Displaying a contour corresponding to the simplified contour detection information in the displayed initial monitoring image; Displaying a generation control and a modification control at a preset position in the area mark position information generation interface; In response to detecting a selection operation acting on the generated control, the simplified contour detection information is determined as area mark position information.

3. The method according to claim 1, wherein: The step of generating a surveillance image to be matched according to the initial surveillance image and the surveillance video frame set includes: Determining the initial monitoring image as a background image; For each surveillance video frame in the surveillance video frame set, perform the following steps: Generate a difference map according to the background image and the surveillance video frame; Determine each pixel point in the difference image that meets a preset condition as a target difference pixel point set; Determine the number of each target differential pixel point included in the target differential pixel point set as the number of moving object pixel points; Determining the image area of ​​the background image as the target image area; Determine the number of pixels in the background image as the number of background pixels; Generate the area of ​​the moving object in the monitoring video frame according to the number of pixels of the moving object, the number of background pixels and the area of ​​the target image; Determine the area of ​​the moving object in the monitoring video frame as the moving object image area; Determine the determined moving object image areas as a moving object image area set, wherein a moving object image area in the moving object image area set corresponds to a monitoring video frame in the monitoring video frame set; Determining the moving object image area that meets the preset screening condition in the moving object image area set as the screening moving object image area; The surveillance video frame corresponding to the screened moving object image area in the surveillance video frame set is determined as the surveillance image to be matched.

4. The method according to claim 1, wherein: Before determining the difference value between the monitoring image to be matched and the initial monitoring image as the target difference value, the method further includes: In response to receiving the power change notification information sent by the preset power monitoring device, according to the monitoring image to be matched, the area mark position information, the mask image and the initial monitoring image, a pixel matching mark correction process is performed to obtain a region mark correction image and correction mark position information corresponding to the monitoring image to be matched; Displaying the region-marked corrected image on the preset interface; The correction mark position information is stored in the preset storage device.

5. The method according to claim 1, wherein: The performing feature point information matching processing on the initial monitoring image feature point information set and the matching monitoring image feature point information set to obtain each matching feature point information group includes: Inputting the initial monitoring image feature point information set into the feature extraction layer of a pre-trained feature point matching prediction model to obtain a first feature vector set, wherein the feature point matching prediction model includes the feature extraction layer, the cross-feature association layer, the correlation weight information screening layer, and the output layer, and an initial monitoring image feature point information in the initial monitoring image feature point information set corresponds to a first feature vector in the first feature vector set; Inputting the matched monitoring image feature point information set into the feature extraction layer to obtain a second feature vector set, wherein one matched monitoring image feature point information in the matched monitoring image feature point information set corresponds to one second feature vector in the second feature vector set; Inputting the first feature vector set and the second feature vector set into the cross-feature association layer to obtain respective correlation weight information representing the correlation weight between each first feature vector in the first feature vector set and each second feature vector in the second feature vector set; Inputting each of the correlation weight information into the correlation weight information screening layer to obtain each of the screening correlation weight information, wherein one of the screening correlation weight information corresponds to one of the initial monitoring image feature point information in the initial monitoring image feature point information set and corresponds to one of the matching monitoring image feature point information in the matching monitoring image feature point information set; The respective screening correlation weight information is input into the output layer to obtain respective matching feature point information groups, wherein one matching feature point information group in the respective matching feature point information groups includes an initial monitoring image feature point information and a matching monitoring image feature point information.

6. An image region marking correction device, comprising: An acquisition unit, configured to acquire an initial monitoring image; A generating unit, configured to generate a mask image and region mark position information corresponding to the initial monitoring image according to the initial monitoring image; The correction unit is configured to perform the following correction steps according to the area mark position information and the mask map: obtain the date in the system time as the current date; obtain a set of surveillance video frames within a preset time period in the current date, wherein each surveillance video frame in the surveillance video frame set has an area mark; generate a surveillance image to be matched according to the initial surveillance image and the surveillance video frame set; determine the difference value between the surveillance image to be matched and the initial surveillance image as a target difference value; in response to determining that the target difference value is greater than a preset threshold, generate a surveillance image to be matched according to the surveillance image to be matched, the area mark position information, and the target difference value; The method comprises: performing pixel matching mark correction processing on the surveillance image to be matched, the mask map and the initial surveillance image, and obtaining a region mark correction image and correction mark position information corresponding to the surveillance image to be matched, wherein the pixel matching mark correction processing is performed according to the surveillance image to be matched, the region mark position information, the mask map and the initial surveillance image, and obtaining a region mark correction image and correction mark position information corresponding to the surveillance image to be matched, including: performing image correction filtering processing on the surveillance image to be matched according to the mask map, and obtaining a matching surveillance image corresponding to the surveillance image to be matched; The initial monitoring image is subjected to feature point information extraction processing to obtain an initial monitoring image feature point information set corresponding to the initial monitoring image; the matching monitoring image is subjected to feature point information extraction processing to obtain a matching monitoring image feature point information set corresponding to the matching monitoring image; the initial monitoring image feature point information set and the matching monitoring image feature point information set are subjected to feature point information matching processing to obtain respective matching feature point information groups; geometric transformation information is generated according to the respective matching feature point information groups; correction mark position information corresponding to the regional mark position information is generated according to the geometric transformation information and the regional mark position information; the pixel value of each pixel point corresponding to the correction mark position information in the monitoring image to be matched is determined as a preset value to update the monitoring image to be matched; the updated monitoring image to be matched is determined as a regional mark correction image; the regional mark correction image is displayed on a preset interface; the correction mark position information is stored in a preset storage device; in response to determining that the target difference value is less than or equal to the preset threshold value, the system time is obtained as the current time; after the preset duration of the current time, the correction step is performed again according to the regional mark position information and the mask map.

7. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

8. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Method and apparatus for correcting region of interest

    CN109117840A

  • Image labeling correction method, device, apparatus and medium

    CN109543683A

  • Target detection method and related device

    CN112989872A

  • Modular inpainting method

    CN113330480A

  • Traffic camera automatic correction method, device, equipment and medium

    CN113382171A