WO2020000311A1 - 图像处理方法、装置、设备以及无人机 - Google Patents
图像处理方法、装置、设备以及无人机 Download PDFInfo
- Publication number
- WO2020000311A1 WO2020000311A1 PCT/CN2018/093390 CN2018093390W WO2020000311A1 WO 2020000311 A1 WO2020000311 A1 WO 2020000311A1 CN 2018093390 W CN2018093390 W CN 2018093390W WO 2020000311 A1 WO2020000311 A1 WO 2020000311A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- target
- foreground
- preset
- pixel difference
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000001514 detection method Methods 0.000 claims abstract description 67
- 230000004927 fusion Effects 0.000 claims description 26
- 230000015654 memory Effects 0.000 claims description 23
- 238000003672 processing method Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 8
- 238000003062 neural network model Methods 0.000 claims description 8
- 238000004891 communication Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 9
- 238000013527 convolutional neural network Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000009191 jumping Effects 0.000 description 3
- 238000000605 extraction Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
- H04N23/76—Circuitry for compensating brightness variation in the scene by influencing the image signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
- H04N5/265—Mixing
Definitions
- the present invention relates to the field of image processing technologies, and in particular, to an image processing method, device, device, and unmanned aerial vehicle.
- UAV unmanned aerial vehicles
- the jitter of the drone will cause the image acquisition device's body to jitter, which will cause the image to jitter or blur, and it will not be able to effectively detect motion in the image Objects (that is, foreground sub-images of moving objects are extracted), resulting in lower accuracy of motion detection.
- Embodiments of the present invention provide an image processing method, device, device, and drone, which can effectively detect a foreground sub-image of a target object in a target image and improve the accuracy of motion detection.
- an embodiment of the present invention provides an image processing method, where the method includes:
- An image connected to the second foreground image in the first foreground image is determined as a foreground sub-image of the target object.
- an embodiment of the present invention provides an image processing apparatus, and the apparatus includes a unit for executing the image processing method according to the first aspect.
- an embodiment of the present invention provides an image processing device, where the device includes a memory and a processor;
- the memory is used to store program instructions
- the processor executes program instructions stored in the memory.
- the processor executes program instructions stored in the memory.
- the processor executes program instructions stored in the memory.
- the processor executes program instructions stored in the memory.
- An image connected to the second foreground image in the first foreground image is determined as a foreground sub-image of the target object.
- an embodiment of the present invention provides a drone, where the drone includes:
- Power system installed on the fuselage to provide flight power
- a processor configured to determine a pixel difference between the target image and a background image of the target image; determine a first foreground image from the target image according to the pixel difference and a first preset pixel difference threshold; and according to the pixel A difference and a second preset pixel difference threshold, and a second foreground image is determined from the target image, wherein the second preset difference threshold is greater than the first preset difference threshold; The connected image of the second foreground image is determined as the foreground sub-image of the target object.
- an embodiment of the present invention provides a computer-readable storage medium.
- the computer-readable storage medium stores a computer program, and the computer program implements the image processing method according to the first aspect when executed by a processor.
- the embodiment of the present invention can determine a pixel difference between a target image and a background image of the target image, determine a first foreground image from the target image according to the pixel difference and a first preset pixel difference threshold, and according to the pixel difference and the second preset
- the pixel difference threshold value determines a second foreground image from the target image, wherein the second preset difference threshold value is greater than the first preset difference threshold value, and an image connected to the second foreground image in the first foreground image is determined as the foreground of the target object
- the image acquisition device used to collect the target image is configured on a movable object (such as a handheld mobile device, a drone), it can still effectively detect the foreground sub-image of the target object in the target image, improving motion detection Accuracy.
- FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention
- FIG. 2A is a schematic diagram of a background image provided by an embodiment of the present invention.
- 2B is a schematic diagram of a foreground image provided by an embodiment of the present invention.
- FIG. 2C is a schematic diagram of a foreground sub-image provided by an embodiment of the present invention.
- FIG. 2D is a schematic diagram of an exposed image provided by an embodiment of the present invention.
- FIG. 3 is a schematic flowchart of another image processing method according to an embodiment of the present invention.
- FIG. 4 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
- FIG. 5 is a schematic structural diagram of an image processing device according to an embodiment of the present invention.
- the image acquisition device used to collect images is generally set on a fixed object, such as a wall or a fixed mounting frame. In this way, during the foreground sub-image extraction process, the background image Is relatively stable.
- the image acquisition device is set on a movable object, it is difficult to extract a foreground sub-image accurately extracted to the foreground object according to the existing image processing method due to the movement and jitter of the movable device.
- the image processing method provided in the embodiment of the present invention is to improve the accuracy of extracting foreground sub-images in a scene where the image acquisition device is set in a scene of a movable object.
- the image processing method may be executed by an image processing device, wherein the image processing device may be provided on any movable object configured with an image acquisition device, wherein the movable object may be output by a power system configured by itself.
- the moving of the power or the object moving under the action of external force will be briefly explained below.
- the image processing device may be set on a drone capable of capturing an image (that is, an image acquisition device is configured). In some cases, the image processing device setting may be set on a control terminal of the drone.
- the image processing method can process an image collected by an image acquisition device configured by a drone to obtain a foreground sub-image of a target object (ie, a foreground object).
- the image processing device may also be set on other types of mobile robots (such as unmanned vehicles and unmanned aerial vehicles) capable of capturing images (that is, configuring image acquisition devices), that is, configuring the mobile robot
- the image collected by the image acquisition device of the computer is processed to obtain a foreground sub-image of a target object (ie, a foreground object).
- the image processing device may also be set on a handheld device (such as a mobile phone, a handheld PTZ camera, etc.) capable of capturing an image, that is, processing an image collected by an image acquisition device configured by the handheld device to obtain a target object (that is, a foreground object). Foreground sub image.
- a handheld device such as a mobile phone, a handheld PTZ camera, etc.
- a target object that is, a foreground object.
- Foreground sub image an image processing method is applied to a drone for illustration.
- FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention.
- the method may be executed by an image processing device.
- the specific explanation of the image processing device is as described above.
- the method according to the embodiment of the present invention includes the following steps.
- S101 Determine a pixel difference between a target image and a background image of the target image.
- a pixel difference between the target image and the background image of the target image may be determined.
- the target image may be acquired by an image acquisition device of the drone. Further, the target image is one or more frames of the target video collected by the image acquisition device.
- the target object may be a foreground object in the target image, such as a pedestrian, an animal, or an item (such as a skateboard, a ball, etc.).
- the background image of the target image may be an image corresponding to the background in the target image.
- the background image of the target image may be The background image of the target video. Exemplarily, the background image may be as shown in FIG. 2A.
- the target video is acquired by the image acquisition device of the drone, and the target video is processed to obtain the background image of the target image.
- a background image is obtained by shooting the scene through an image acquisition device of the drone.
- the scene is captured by the image acquisition device of the drone to obtain the target image.
- the image processing device can acquire the background image of the target image from the local memory or through the Internet.
- the image processing device includes a local memory.
- the local memory may store a background image first.
- the image processing device can download a background image through the Internet.
- the specific manner in which the image processing device determines the pixel difference between the target image and the background image of the target image may be: the target image and the background image may be compared to obtain the pixel difference between the target image and the background image, and further, Ground, the pixel of the target image and the background image are subjected to a difference operation to obtain a pixel difference.
- the specific implementation method can refer to the existing technology, and will not be repeated here.
- the pixel difference can represent the similarity between the target image and the background image. When the pixel difference corresponding to a pixel in the target image is smaller, it means that the pixel is more likely to be a pixel of the background image. Conversely, when the pixel difference is larger , Indicating that the pixel is more likely to be the corresponding pixel of the foreground image.
- S102 Determine a first foreground image from the target image according to the pixel difference and a first preset pixel difference threshold.
- the first foreground image may be determined from the target image according to the pixel difference and a first preset pixel difference threshold.
- the first preset pixel difference threshold may represent a similarity threshold between the target image and the background image.
- the pixel difference may represent the similarity between the image and the background image.
- a first preset pixel difference threshold to determine a first foreground image from the target image.
- the image processing device may determine an image composed of pixels in the target image with pixel differences greater than the first preset pixel difference threshold as the first foreground image. .
- S103 Determine a second foreground image from the target image according to the pixel difference and the second preset pixel difference threshold, where the second preset pixel difference threshold is greater than the first preset pixel difference threshold.
- the second preset pixel difference threshold may represent another similarity threshold between the target image and the background image.
- the pixel difference may represent the difference between the target image and the background image.
- the similarity degree of some pixels in the target image can be considered as the pixels of the foreground image when the similarity degree of certain pixels in the target image is greater than the similarity degree threshold value.
- the similarity degree is less than the similarity degree threshold value, the pixels can be considered as the background image.
- the second foreground image can be determined from the target image by the pixel difference and the second preset pixel difference threshold.
- the image processing device can compose pixels in the target image that have pixel differences greater than the second preset pixel difference threshold. The image is determined as the second foreground image.
- the first preset pixel difference threshold and the second preset pixel difference threshold may represent two similarity thresholds between the target image and the background image, where the second preset pixel difference threshold is greater than the first preset pixel difference threshold It can be shown that the similarity threshold represented by the second preset pixel difference threshold is higher than the similarity threshold represented by the first preset pixel difference threshold.
- the obtained first foreground image includes a second foreground image, where an area of the first foreground image is larger than an area of the second foreground image. Taking the schematic diagram of the foreground image shown in FIG. 2B as an example, a gray area may constitute a first foreground image, and a black area may constitute a second foreground image.
- S104 Determine an image connected to the second foreground image in the first foreground image as a foreground sub-image of the target object.
- the image processing device may use a connection algorithm to determine an image connected to the second foreground image in the first foreground image as a foreground sub-image of the target object.
- the image processing device may use the black area in FIG. 2B as a starting point, perform a fill operation, and fill an area connected to the second foreground image with a set color.
- the filled image may be a foreground sub-image of the target object.
- the foreground sub-image can be shown in Figure 2C.
- the number of the second foreground images may be one or more.
- the pre- The conditional second foreground image is determined as the second target foreground image, and further, the image connected to the second target foreground image in the first foreground image is determined as the foreground sub-image of the target object.
- the image processing device may determine a second foreground image having an area greater than or equal to a preset area threshold as the second target foreground image. That is, the second foreground image satisfying the preset condition is a second foreground image with an area greater than or equal to a preset area threshold. In this embodiment, if the area of the second foreground image is smaller than a preset area threshold, the image processing device may determine that the second foreground image has noise, and then select a second foreground image with an area greater than or equal to the preset area threshold, and change the area. A second foreground image that is greater than or equal to a preset area threshold is determined as the second target foreground image.
- the image processing device may obtain depth information corresponding to the target image, determine the depth of the second foreground image according to the depth information, and determine the second foreground image with the smallest depth as the second target foreground image.
- the number of the second foreground images is three, which are the second foreground image 1, the second foreground image 2, and the second foreground image 3.
- the image processing device determines that the depth of the second foreground image 1 is the first depth, the depth of the second foreground image 2 is the second depth, and the depth of the second foreground image 3 is the third depth according to the depth information. Where the first depth is greater than the second depth and the second depth is greater than the third depth, the depth of the second foreground image 3 is the smallest, and the image processing device may determine the second foreground image 3 as the second target foreground image.
- the image processing device may identify a target object in the target image to obtain a detection frame of the target object, and determine a second foreground image that satisfies a preset positional relationship with the detection frame as the second target foreground image.
- the image processing device may use a target detection algorithm to identify a target object in the target image to obtain a detection frame of the target object, and determine a second foreground image that satisfies a preset position relationship with the detection frame as a second For the target foreground image, the detection frame can be as shown in FIG. 2B. It is determined by the target detection algorithm that the target object is located in the detection frame.
- the image processing device may recognize the target object in the target image through a neural network model to obtain a detection frame of the target object.
- the neural network model may include a convolutional neural network (Regions with Convolutional Neural Network, R-CNN) model, a fast convolutional neural network feature Fast-RCNN model, or a faster convolutional neural network feature Faster-RCNN model, etc. .
- the image processing device may determine the second foreground image within the detection frame as the second target foreground image.
- the target image includes four second foreground images, of which three second foreground images are located in the detection frame and another second foreground image is located outside the detection frame.
- the image processing device may The second foreground images are determined as the second target foreground image.
- the image processing device may determine the second foreground image whose distance from the detection frame is less than or equal to a preset distance threshold as the second target foreground image.
- the target image includes four second foreground images, wherein the distance between the three second foreground images and the detection frame is less than a preset distance threshold, and the distance between the other second foreground image and the detection frame is greater than
- the image processing device may determine the three second foreground images in the detection frame as the second target foreground image.
- the number of the first foreground images may be one or more, and the image processing device may identify the target object in the target image. If it is determined through the recognition that there is no detection frame of the target object, the image processing The device may determine the first foreground image with the largest area as the foreground sub-image of the target object. For example, after the image processing device obtains the target image, it can use the target detection algorithm to identify the target object in the target image. If the target object is not recognized, the image processing device can determine that there is no detection frame of the target object, and then the area The largest first foreground image is determined as the foreground sub-image of the target object.
- a pixel difference between a target image and a background image of the target image is determined, and a first foreground image is determined from the target image according to the pixel difference and a first preset pixel difference threshold.
- a pixel difference threshold is set to determine a second foreground image from the target image, where the second preset difference threshold is greater than the first preset difference threshold, and an image connected to the second foreground image in the first foreground image is determined as the target object.
- the foreground sub-image can effectively detect the foreground sub-image of the target object in the target image and improve the accuracy of motion detection.
- FIG. 3 is a schematic flowchart of another image processing method according to an embodiment of the present invention.
- the method may be executed by an image processing device.
- the specific explanation of the image processing device is as described above.
- the foreground sub-images of the target object in the multi-frame target image can be obtained based on the embodiment shown in FIG. .
- S301 Select at least two target images in the target video according to the image selection algorithm corresponding to the target video.
- the image processing device may establish an image selection algorithm corresponding to different videos in advance.
- the image processing device may obtain an image selection algorithm corresponding to the target video and select at least two frames in the target video.
- the target image The image selection algorithm is used to select a target image, and the target image may include a target object.
- the image processing device may acquire a foreground sub-image of a target object included in each image in at least two frames of images included in the target video.
- the image processing device may obtain an application scenario of the target video, obtain an image selection algorithm corresponding to the application scenario according to a preset correspondence between the application scenario and the image selection algorithm, and use the target video as an input of the image selection algorithm. To get at least two frames of the target image.
- the image processing device may pre-establish image selection algorithms corresponding to different application scenarios.
- the image processing device may obtain the application scenario of the target video, obtain the image selection algorithm corresponding to the application scenario, and image processing.
- the device may use the image selection algorithm corresponding to the application scenario as the image selection algorithm corresponding to the target video, further take the target video as the input of the image selection algorithm, and the image output by the image selection algorithm as at least two frames of the target image.
- the application scenario may include the motion posture of the target object, such as a jumping posture, a gesture of avalokitesvara or a martial arts posture.
- the image selection algorithm may specifically be: acquiring a frame of an image in a target video every preset number of frames, and using the acquired image as a target image.
- the preset number of frames may be preset, for example, three frames per interval or five frames per interval.
- the target video includes 10 frames of images.
- the image processing device can obtain one frame of images from the target video every two frames. That is, the image processing device can convert the first frame image, the fourth frame image, the seventh frame image, and the tenth frame. The image is used as the target image.
- the image processing device may determine the application scenario of the target video as the first application scenario, and then obtain an image selection algorithm corresponding to the first application scenario.
- the target video is used as the input of the image selection algorithm.
- the image processing device can obtain a frame of the image in the target video every preset number of frames, and use the obtained image as the target image.
- the image processing device may obtain the foreground sub-image in each frame of the image included in the target video according to the background image, select the target foreground sub-image according to the spatial information and time information of each foreground sub-image, and convert the target The image to which the foreground sub-image belongs is determined as the target image.
- the image processing device may obtain the foreground sub-images in each frame of the target video according to the background image, and may then Spatial and temporal information of the image, select the foreground motion image of the target object as the jump, jump to the highest point, and the landing sub-image, and use the selected foreground sub-image as the target foreground sub-image, and then the image to which the foreground sub-image belongs As the target image.
- the image processing device may determine that the application scene of the target video is the second application scene, and then obtain an image selection algorithm corresponding to the second application scene, and select the target video as the image. Based on the input of the algorithm, the image processing device can obtain the foreground sub-image in each frame of the target video according to the background image, and select the target foreground sub-image based on the space and time information of each foreground sub-image. The image to which the image belongs is determined as the target image.
- S302 Obtain a foreground sub-image of the target object in each frame of the target image.
- the target object can be obtained in each frame of the target image based on the image processing method shown in FIG. 1 Foreground sub image.
- the image processing device may obtain, based on the time information of the foreground sub-image, an image in the target video whose time information is greater than the time information of the foreground sub-image.
- the sub-image and each acquired image are subjected to image fusion to update the acquired image, and the target video is updated according to the updated image.
- the updated target video includes the updated image.
- the image processing device selects four target images in the target video, which are the first frame image, the fourth frame image, the seventh frame image, and the tenth frame image in the target video;
- the movement posture of the target object contained in the first foreground sub-image is run-up, and the movement posture of the target object contained in the second foreground sub-image obtained in the fourth frame image is take-off, and in the seventh frame image
- the motion posture of the target object included in the acquired third foreground sub-image is to jump to the highest point, and the motion posture of the target object included in the fourth foreground sub-image acquired in the tenth frame image is landing.
- the image processing device may determine that the time information of the first foreground sub-image is the first frame, and the image whose time information in the target video is greater than the first frame is the 2-10 frame image, and then the first foreground sub-image and the first Perform image fusion on 2-10 frames of images to obtain updated 2-10 frames of images.
- the image processing device can determine that the time information of the second foreground sub-image is the fourth frame, and the image whose time information in the target video is greater than the fourth frame is the 5-10 frame image, and then the second foreground sub-image Image fusion is performed with the updated 5-10th frame images, respectively, to obtain updated 5-10th frame images.
- the image processing device can determine that the time information of the third foreground sub-image is the seventh frame, and the image whose time information in the target video is greater than the seventh frame is the 8-10 frame image, and then the third foreground sub-image Perform image fusion with the updated 8-10th frame images, respectively, to obtain updated 8-10th frame images.
- the image processing device may determine that the time information of the fourth foreground sub-image is the tenth frame, and there is no image with time information greater than the tenth frame in the target video, and the image processing device may update the target video.
- the updated target video includes The updated image, for example, the target video includes the first frame image and the updated 2-10 frame image, where the updated second frame image is obtained by image fusion of the first foreground sub image and the second frame image.
- the updated fifth frame image is obtained by image fusion of the first foreground sub image, the second foreground sub image, and the fifth frame image
- the updated eighth frame image is the first foreground sub image,
- the second foreground sub-image, the third foreground sub-image, and the fifth frame image are obtained by image fusion.
- the updated tenth frame image is the first foreground sub-image, the second foreground sub-image, and the third The foreground sub-image, the fourth foreground sub-image, and the fifth frame image are obtained by image fusion.
- the image processing device may perform image fusion of all foreground sub-images and background images to obtain an exposed image, and the exposed image may be as shown in FIG. 2D.
- the background image may be obtained by the image processing device processing the target video, or may be obtained by the image processing device through the image acquisition device, in a local memory, or through the Internet.
- the image processing device may obtain the position of each frame of the foreground sub-image in the target image to which the foreground sub-image belongs, and perform image fusion of the foreground sub-image and the background image according to the position to obtain an exposed image.
- the image processing device fuses the first foreground sub-image and the background image according to the position to obtain an exposed image.
- a foreground sub-image contains a target object on the right side of the exposure image, and the distance between the target object and each edge of the exposure image is the same as the distance between the target object and the corresponding edge of the first frame image.
- a target image is selected from the target video, a foreground sub-image of the target object is obtained from the target image, and the foreground sub-image and the background image of the target image are subjected to image fusion to obtain
- the exposed image can effectively achieve multiple exposures and improve the quality of the exposed image.
- FIG. 4 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
- the image processing apparatus described in this embodiment includes:
- a pixel difference determining unit 401 configured to determine a pixel difference between a target image and a background image of the target image
- a foreground image determining unit 402 configured to determine a first foreground image from the target image according to the pixel difference and a first preset pixel difference threshold;
- the foreground image determining unit 402 is further configured to determine a second foreground image from the target image according to the pixel difference and a second preset pixel difference threshold, where the second preset difference threshold is greater than a first preset Difference threshold
- the foreground sub-image determining unit 403 is configured to determine an image connected to the second foreground image in the first foreground image as a foreground sub-image of the target object.
- the number of the second foreground images is one or more;
- the method further includes:
- the foreground image determination unit 402 determines a second foreground image that satisfies a preset condition as a second target foreground image
- the foreground sub-image determining unit 403 determining an image in the first foreground image that is connected to the second foreground image as the foreground sub-image of the target object includes:
- An image connected to the second target foreground image in the first foreground image is determined as a foreground sub-image of the target object.
- the determining, by the foreground image determination unit 402, a second foreground image that satisfies a preset condition as a second target foreground image includes:
- a second foreground image having an area greater than or equal to a preset area threshold is determined as the second target foreground image.
- the image processing apparatus may further include:
- a recognition unit 404 configured to recognize a target object in the target image to obtain a detection frame of the target object
- the determining, by the foreground image determining unit 402, a second foreground image satisfying a preset condition as a second target foreground image includes:
- a second foreground image that satisfies a preset positional relationship with the detection frame is determined as the second target foreground image.
- the recognition unit 404 recognizes a target object in the target image to obtain a detection frame of the target object, including:
- a target object in the target image is identified by a neural network model to obtain a detection frame of the target object.
- the foreground image determining unit 402 determines a second foreground image that satisfies a preset positional relationship with the detection frame as the second target foreground image, including:
- the foreground image determining unit 402 determines a second foreground image that satisfies a preset positional relationship with the detection frame as the second target foreground image, including:
- a second foreground image having a distance from the detection frame that is less than or equal to a preset distance threshold is determined as the second target foreground image.
- the number of the first foreground images is one or more, and the image processing apparatus may further include:
- a recognition unit 404 configured to identify the target object in the target image by the foreground image determination unit 402;
- the foreground sub-image determining unit 403 is further configured to determine the first foreground image with the largest area as the foreground sub-image of the target object when the detection frame of the target object cannot be obtained through the recognition.
- the image processing apparatus may further include:
- An image selection unit 405, configured to select a plurality of frames of a target image in a target video before determining a pixel difference between the target image and a background image of the target image;
- An image fusion unit 406 is configured to, after determining a foreground sub-image of a target object in the target image in each frame, perform image fusion of the foreground sub-image and a background image of the target image in each frame to obtain an exposed image.
- the image fusion unit 406 performs image fusion of the foreground sub-image and the background image of the target image in each frame to obtain an exposed image, including:
- image fusion is performed on the foreground sub image and the background image of the target image to obtain the exposure image.
- the image processing apparatus may further include:
- the background image acquisition unit 407 is used for the pixel difference determination unit 401 to determine the pixel difference between the target image and the background image of the target image, and then process the target video to obtain the background image.
- the pixel difference determination unit 401 determines a pixel difference between a target image and a background image of the target image
- the foreground image determination unit 402 determines a first foreground from the target image according to the pixel difference and a first preset pixel difference threshold.
- foreground image determination unit 402 determines a second foreground image from a target image according to a pixel difference and a second preset pixel difference threshold
- foreground sub-image determination unit 403 determines an image in the first foreground image that is connected to the second foreground image
- the foreground sub-image of the target object can be effectively detected in the target image, thereby improving the accuracy of motion detection.
- FIG. 5 is a schematic structural diagram of an image processing device according to an embodiment of the present invention.
- the image processing device includes: a memory 501, a processor 502, a user interface 503, and a data interface 504, where the user interface 503 is used to output a foreground sub-image or a target video.
- the memory 501 may include a volatile memory; the memory 501 may also include a non-volatile memory; the memory 501 may further include a combination of the foregoing types of memories.
- the processor 502 may be a central processing unit (CPU).
- the processor 502 may further include a hardware chip.
- the above hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.
- the PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), or any combination thereof.
- the memory 501 is configured to store program instructions.
- the processor 502 may call a program instruction stored in the memory 501, and is configured to perform the following steps:
- An image connected to the second foreground image in the first foreground image is determined as a foreground sub-image of the target object.
- the number of the second foreground images is one or more;
- the processor 502 is further configured to determine, according to the pixel difference and a second preset pixel difference threshold, a second foreground image from the target image, a second foreground image that satisfies a preset condition as a second Target foreground image
- the processor 502 is configured to determine an image connected to the second target foreground image in the first foreground image as a foreground sub-image of the target object.
- the processor 502 is configured to determine a second foreground image having an area greater than or equal to a preset area threshold as the second target foreground image.
- the processor 502 is further configured to identify a target object in the target image to obtain a detection frame of the target object;
- the processor 502 is configured to determine a second foreground image that satisfies a preset position relationship with the detection frame as the second target foreground image.
- the processor 502 is configured to identify a target object in the target image by using a neural network model to obtain a detection frame of the target object.
- the processor 502 is configured to determine a second foreground image within the detection frame as the second target foreground image.
- the processor 502 is configured to determine a second foreground image whose distance from the detection frame is less than or equal to a preset distance threshold as the second target foreground image.
- the number of the first foreground images is one or more;
- the processor 502 is further configured to identify a target object in the target image, and when a detection frame of the target object cannot be obtained through the recognition, determine a first foreground image having the largest area as the target object. Foreground sub image.
- the processor 502 is further configured to: before determining a pixel difference between the target image and a background image of the target image, select multiple frames of the target image in the target video, and determine each frame After the foreground sub-image of the target object in the target image, image fusion is performed on the foreground sub-image and the background image of the target image in each frame to obtain an exposed image.
- the processor 502 is configured to obtain a position of each frame of the foreground sub-image in a target image to which the foreground sub-image belongs, and according to the position, combine the foreground sub-image and the target.
- the background image of the image is subjected to image fusion to obtain the exposure image.
- the processor 502 is further configured to determine the pixel difference between the target image and the background image of the target image, and then process the target video to obtain the background image.
- processor 501 for specific implementation of the processor 501 in this embodiment of the present invention, reference may be made to the description of related content in the foregoing embodiments, and details are not described herein.
- An embodiment of the present invention also provides an unmanned aerial vehicle, including: a fuselage; a power system provided on the fuselage for providing flying power; and a processor for determining a distance between a target image and a background image of the target image Pixel difference; determining a first foreground image from the target image according to the pixel difference and a first preset pixel difference threshold; determining from the target image according to the pixel difference and a second preset pixel difference threshold A second foreground image, wherein the second preset difference threshold is greater than the first preset difference threshold; determining an image in the first foreground image that is connected to the second foreground image as a foreground sub-object of the target object image.
- the number of the second foreground images is one or more;
- the processor is further configured to determine a second foreground image that meets a preset condition as a second target after determining a second foreground image from the target image according to the pixel difference and a second preset pixel difference threshold.
- a foreground image determining an image in the first foreground image that is in communication with the second target foreground image as a foreground sub-image of the target object.
- the processor is configured to determine a second foreground image having an area greater than or equal to a preset area threshold as the second target foreground image.
- the processor is further configured to identify a target object in the target image to obtain a detection frame of the target object; a second frame that will satisfy the preset position relationship with the detection frame
- the foreground image is determined as the second target foreground image.
- the processor is configured to identify a target object in the target image by using a neural network model to obtain a detection frame of the target object.
- the processor is configured to determine a second foreground image within the detection frame as the second target foreground image.
- the processor is configured to determine a second foreground image whose distance from the detection frame is less than or equal to a preset distance threshold as the second target foreground image.
- the number of the first foreground images is one or more;
- the processor is further configured to identify a target object in the target image, and when a detection frame of the target object cannot be obtained through the recognition, determine a first foreground image with the largest area as Foreground image.
- the processor is further configured to select multiple frames of the target image in the target video before determining the pixel difference between the target image and the background image of the target image, and determine After the foreground sub-image of the target object in the target image is described, image fusion is performed on the foreground sub-image and the background image of the target image in each frame to obtain an exposed image.
- the processor is configured to obtain a position of each frame of the foreground sub-image in a target image to which the foreground sub-image belongs, and according to the position, combine the foreground sub-image and the target image Image fusion is performed on the background image to obtain the exposure image.
- the processor is further configured to determine the pixel difference between the target image and the background image of the target image before processing the target video to obtain the background image.
- the drone may be a quad-rotor drone, a six-rotor drone, a multi-rotor drone, and other types of aircraft.
- the power system may include a motor, an ESC, and a propeller.
- the motor is responsible for driving the aircraft propeller
- the ESC is responsible for controlling the rotation speed of the motor of the aircraft.
- a computer-readable storage medium is also provided in the embodiment of the present invention.
- the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the corresponding implementation of FIG. 1 or FIG.
- the image processing method described in the example can also implement the image processing device according to the embodiment of the present invention shown in FIG. 5, and details are not described herein again.
- the computer-readable storage medium may be an internal storage unit of the device according to any one of the foregoing embodiments, such as a hard disk or a memory of the device.
- the computer-readable storage medium may also be an external storage device of the device, such as a plug-in hard disk, a Smart Media Card (SMC), and a Secure Digital (SD) card equipped on the device. , Flash card (Flash card) and so on.
- the computer-readable storage medium may further include both an internal storage unit of the device and an external storage device.
- the computer-readable storage medium is used to store the computer program and other programs and data required by the terminal.
- the computer-readable storage medium may also be used to temporarily store data that has been or will be output.
- the program can be stored in a computer-readable storage medium.
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random, Access Memory, RAM).
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
本发明实施例提供了一种图像处理方法、装置、设备以及无人机,其中,方法包括:确定目标图像和目标图像的背景图像之间的像素差异;根据像素差异和第一预设像素差异阈值,从目标图像中确定第一前景图像;根据像素差异和第二预设像素差异阈值,从目标图像中确定第二前景图像,其中,第二预设差异阈值大于第一预设差异阈值;将第一前景图像中与第二前景图像连通的图像确定为目标对象的前景子图像。本发明实施例,可有效在目标图像中检测到目标对象的前景子图像,提高运动检测的精准度。
Description
本发明涉及图像处理技术领域,尤其涉及图像处理方法、装置、设备以及无人机。
随着科学技术的发展,图像采集设备(如相机、摄像机等)在家庭、工业、军事等领域的应用日益广泛,并且随着飞行器技术的发展,无人驾驶飞机简称无人机(Unmanned Aerial Vehicle,UAV)在家庭、工业、军事等领域的应用同样日益广泛,例如航拍、视频监控或者安防领域(当有运动物体出现在拍摄画面中时,自动发出报警信号,提醒安保人员)。但是,处于飞行状态的无人机通过图像采集设备采集图像数据时,无人机的抖动会带来图像采集设备机身的抖动,从而会导致图像抖动或者模糊,无法有效在图像中检测到运动物体(即提取运动物体的前景子图像),导致运动检测的精准度较低。
发明内容
本发明实施例提供了一种图像处理方法、装置、设备以及无人机,可有效在目标图像中检测到目标对象的前景子图像,提高运动检测的精准度。
第一方面,本发明实施例提供了一种图像处理方法,所述方法包括:
确定目标图像和目标图像的背景图像之间的像素差异;
根据所述像素差异和第一预设像素差异阈值,从所述目标图像中确定第一前景图像;
根据所述像素差异和第二预设像素差异阈值,从所述目标图像中确定第二前景图像,其中,所述第二预设差异阈值大于第一预设差异阈值;
将所述第一前景图像中与所述第二前景图像连通的图像确定为目标对象的前景子图像。
第二方面,本发明实施例提供了一种图像处理装置,所述装置包括用于执行如第一方面所述的图像处理方法的单元。
第三方面,本发明实施例提供了一种图像处理设备,所述设备包括存储器 和处理器;
所述存储器,用于存储程序指令;
所述处理器,执行所述存储器存储的程序指令,当程序指令被执行时,所述处理器用于执行如下步骤:
确定目标图像和目标图像的背景图像之间的像素差异;
根据所述像素差异和第一预设像素差异阈值,从所述目标图像中确定第一前景图像;
根据所述像素差异和第二预设像素差异阈值,从所述目标图像中确定第二前景图像,其中,所述第二预设差异阈值大于第一预设差异阈值;
将所述第一前景图像中与所述第二前景图像连通的图像确定为目标对象的前景子图像。
第四方面,本发明实施例提供了一种无人机,所述无人机包括:
机身;
设置在机身上的动力***,用于提供飞行动力;
处理器,用于确定目标图像和目标图像的背景图像之间的像素差异;根据所述像素差异和第一预设像素差异阈值,从所述目标图像中确定第一前景图像;根据所述像素差异和第二预设像素差异阈值,从所述目标图像中确定第二前景图像,其中,所述第二预设差异阈值大于第一预设差异阈值;将所述第一前景图像中与所述第二前景图像连通的图像确定为目标对象的前景子图像。
第五方面,本发明实施例提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,该计算机程序被处理器执行时实现如上述第一方面所述的图像处理方法。
本发明实施例能够确定目标图像和目标图像的背景图像之间的像素差异,根据像素差异和第一预设像素差异阈值,从目标图像中确定第一前景图像,根据像素差异和第二预设像素差异阈值,从目标图像中确定第二前景图像,其中,第二预设差异阈值大于第一预设差异阈值,将第一前景图像中与第二前景图像连通的图像确定为目标对象的前景子图像,即使用于采集目标图像的图像采集设备是被配置在可移动物体(例如手持移动设备、无人机上),依然可有效在目标图像中检测到目标对象的前景子图像,提高运动检测的精准度。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的一种图像处理方法的流程示意图;
图2A是本发明实施例提供的一种背景图像的示意图;
图2B是本发明实施例提供的一种前景图像的示意图;
图2C是本发明实施例提供的一种前景子图像的示意图;
图2D是本发明实施例提供的一种曝光图像的示意图;
图3是本发明实施例提供的另一种图像处理方法的流程示意图;
图4是本发明实施例提供的一种图像处理装置的结构示意图;
图5是本发明实施例提供的一种图像处理设备的结构示意图。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
下面结合附图,对本发明的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
目前在运动检测常应用视频监控领域,其中,用于采集图像的图像采集设备一般设置在固定物体上,例如设置在墙壁、固定安装架上,这样,在进行前景子图像提取过程中,背景图像是比较稳定的。然而,当图像采集设备设置在可移动物体上时,由于可移动设备的移动、抖动,导致按照现有的图像处理方法很难提取准确地提取到前景物体的前景子图像。
为了解决上述问题,本发明实施例提供的图像处理方法,以在图像采集设备设置在可移动物体的场景中提高提取前景子图像的精度。所述图像处理方法可以由图像处理设备执行,其中,所述图像处理设备可以设置在任何配置了图像采集设备的可移动物体上,其中,所述可移动物体可以为依靠自身配置的动 力***输出的动力移动或者在外力作用下移动的物体,下面将简单地说明。该图像处理设备可以设置在能够拍摄图像(即配置图像采集设备)的无人机上,在某些情况中,所述图像处理设备设置可以设置在无人机的控制终端上。该图像处理方法可以对无人机配置的图像采集设备采集的图像进行处理以获取目标对象(即前景物体)的前景子图像。在其他实施例中,所述图像处理设备也可以设置在其他类型的能够拍摄图像(即配置图像采集设备)的移动机器人上(例如无人车、无人机船上),即对移动机器人机配置的图像采集设备采集的图像进行处理以获取目标对象(即前景物体)的前景子图像。所述图像处理设备也可以设置在能够拍摄图像的手持设备(例如手机、手持云台相机等)上,即对手持设备配置的图像采集设备采集的图像进行处理以获取目标对象(即前景物体)的前景子图像。下面将以图像处理方法应用于无人机来进行举例说明。
请参见图1,图1是本发明实施例提供的一种图像处理方法的流程示意图,所述方法可以由图像处理设备执行,其中,图像处理设备的具体解释如前所述。具体的,本发明实施例的所述方法包括如下步骤。
S101:确定目标图像和目标图像的背景图像之间的像素差异。
本发明实施例中,图像处理设备获取到目标图像和目标图像的背景图像之后,可以确定目标图像和目标图像的背景图像之间的像素差异。其中,目标图像可以是通过无人机的图像采集设备采集的,进一步地,所述目标图像是所述图像采集设备采集到的目标视频中的一帧或多帧图像。目标对象可以是目标图像中的前景物体,例如行人、动物或者道具(例如滑板、皮球等)等。目标图像的背景图像可以是目标图像中的背景对应的图像,当所述目标图像是所述图像采集设备采集到的目标视频中的一帧或多帧图像,所述目标图像的背景图像可以是目标视频的背景图像。示例性地,背景图像可以如图2A所示。
其中,图像处理设备获取背景图像的具体方式可以有如下多种:
一、通过无人机的图像采集设备采集得到目标视频,对目标视频进行处理,得到目标图像的背景图像。
二、在某一场景未出现目标对象时,通过无人机的图像采集设备对该场景进行拍摄得到背景图像。在目标对象出现在该场景中时,通过无人机的图像采集设备对该场景进行拍摄得到目标图像。
三、图像处理设备可以从本地存储器中或者通过互联网获取目标图像的背景图像。其中,图像处理设备中包括本地存储器,其中,本地存储器可以先存储背景图像。在某些情况中,图像处理设备可以通过互联网下载背景图像。
其中,图像处理设备确定目标图像和目标图像的背景图像之间的像素差异的具体方式可以为:可以将目标图像与背景图像进行比较以获取目标图像和背景图像之间的像素差异,其中,进一步地,将目标图像的像素与背景图像进行差分运算以得到像素差异,其中,具体实现方法可以参考现有技术,在这里不再赘述。像素差异可以表征目标图像与背景图像之间的相似程度,当目标图像中的像素对应的所述像素差异越小,说明该像素越有可能是背景图像的像素,反之,当像素差异越大时,说明该像素越有可能是前景图像对应的像素。
S102:根据像素差异和第一预设像素差异阈值,从目标图像中确定第一前景图像。
本发明实施例中,图像处理设备确定目标图像和目标图像的背景图像之间的像素差异之后,可以根据像素差异和第一预设像素差异阈值,从目标图像中确定第一前景图像。具体地,所述第一预设像素差异阈值可以表征目标图像和背景图像之间的一个相似程度阈值,如前所述,像素差异可以表征图像与背景图像之间的相似程度,当目标图像中的某些像素的所述相似程度大于相似程度阈值时,可以认为这些像素是前景图像的像素,当相似程度小于相似程度阈值时,可以认为这些像素是背景图像的像素,这样,可以通过像素差异和第一预设像素差异阈值从目标图像中确定第一前景图像,具体地,图像处理设备可以将目标图像中像素差异大于第一预设像素差异阈值的像素组成的图像确定为第一前景图像。
S103:根据像素差异和第二预设像素差异阈值,从目标图像中确定第二前景图像,其中,第二预设像素差异阈值大于第一预设像素差异阈值。
本发明实施例中,具体地,所述第二预设像素差异阈值可以表征目标图像和背景图像之间的另一个相似程度阈值,如前所述,像素差异可以表征目标图像与背景图像之间的相似程度,当目标图像中的某些像素的所述相似程度大于相似程度阈值时,可以认为这些像素是前景图像的像素,当相似程度小于相似程度阈值时,可以认为这些像素是背景图像的像素,这样,可以通过像素差异和第二预设像素差异阈值从目标图像中确定第二前景图像,具体地,图像处理 设备可以将目标图像中像素差异大于第二预设像素差异阈值的像素组成的图像确定为第二前景图像。
所述第一预设像素差异阈值和第二预设像素差异阈值可以表征目标图像和背景图像之间的两个相似程度阈值,其中,第二预设像素差异阈值大于第一预设像素差异阈值,可以表示第二预设像素差异阈值表征的相似程度阈值高于第一预设像素差异阈值表征的相似程度阈值。获取得到的第一前景图像包括第二前景图像,其中,第一前景图像的面积大于第二前景图像的面积。以图2B所示的前景图像的示意图为例,灰色区域可以组成第一前景图像,黑色区域可以组成第二前景图像。
S104:将第一前景图像中与第二前景图像连通的图像确定为目标对象的前景子图像。
本发明实施例中,图像处理设备可以使用连通算法,将第一前景图像中与第二前景图像连通的图像确定为目标对象的前景子图像。例如,图像处理设备可以将图2B中的黑色区域作为起始点,进行填充运算,将与第二前景图像相连区域填充为设定的颜色,填充后的图像可以为目标对象的前景子图像,该前景子图像可以如图2C所示。
在一个实施例中,第二前景图像的数量可以为一个或多个,则图像处理设备根据像素差异和第二预设像素差异阈值,从目标图像中确定第二前景图像之后,可以将满足预设条件的第二前景图像确定为第二目标前景图像,进而将第一前景图像中与第二目标前景图像连通的图像确定为目标对象的前景子图像。
在一个实施例中,图像处理设备可以将面积大于或等于预设面积阈值的第二前景图像确定为所述第二目标前景图像。即满足预设条件的第二前景图像为面积大于或等于预设面积阈值的第二前景图像。在该实施例中,如果第二前景图像的面积小于预设面积阈值,图像处理设备可以确定该第二前景图像存在噪声,进而选取面积大于或等于预设面积阈值的第二前景图像,将面积大于或等于预设面积阈值的第二前景图像确定为所述第二目标前景图像。
在一个实施例中,图像处理设备可以获取与目标图像对应的深度信息,根据深度信息确定第二前景图像的深度,将深度最小的第二前景图像确定为第二目标前景图像。例如,第二前景图像的数量为三个,分别为第二前景图像1、第二前景图像2以及第二前景图像3。图像处理设备根据深度信息确定第二前 景图像1的深度为第一深度,第二前景图像2的深度为第二深度,以及第二前景图像3的深度为第三深度。其中第一深度大于第二深度,且第二深度大于第三深度,则第二前景图像3的深度最小,图像处理设备可以将第二前景图像3确定为第二目标前景图像。
在一个实施例中,图像处理设备可以对目标图像中的目标对象进行识别,以获取目标对象的检测框,将和检测框满足预设位置关系的第二前景图像确定为第二目标前景图像。在该实施例中,图像处理设备可以使用目标检测算法对目标图像中的目标对象进行识别,以获取目标对象的检测框,将和检测框满足预设位置关系的第二前景图像确定为第二目标前景图像,检测框可以如图2B所示,通过目标检测算法确定目标对象位于检测框内。
在一个实施例中,图像处理设备可以通过神经网络模型对目标图像中的目标对象进行识别,以获取目标对象的检测框。示例性地,神经网络模型可以包括卷积神经网络特征(Regions with Convolutional Neural Network,R-CNN)模型、快速卷积神经网络特征Fast-RCNN模型或者较快卷积神经网络特征Faster-RCNN模型等。
在一个实施例中,图像处理设备可以将在检测框内的第二前景图像确定为第二目标前景图像。以图2B为例,目标图像包括四个第二前景图像,其中三个第二前景图像位于检测框内,另外一个第二前景图像位于检测框外,图像处理设备可以将在检测框内的三个第二前景图像确定为第二目标前景图像。
在一个实施例中,图像处理设备可以将和检测框之间的距离小于或等于预设距离阈值的第二前景图像确定为第二目标前景图像。以图2B为例,目标图像包括四个第二前景图像,其中三个第二前景图像与检测框之间的距离小于预设距离阈值,另外一个第二前景图像和检测框之间的距离大于预设距离阈值,则图像处理设备可以将在检测框内的三个第二前景图像确定为第二目标前景图像。
在一个实施例中,第一前景图像的数量可以为一个或多个,则图像处理设备可以对目标图像中的目标对象进行识别,如果通过所述识别确定不存在目标对象的检测框,图像处理设备可以将面积最大的第一前景图像确定为目标对象的前景子图像。例如,图像处理设备获取到目标图像之后,可以使用目标检测算法对目标图像中的目标对象进行识别,如果没有识别到目标对象,即图像处 理设备可以确定不存在目标对象的检测框,进而将面积最大的第一前景图像确定为目标对象的前景子图像。
本发明实施例中,确定目标图像和目标图像的背景图像之间的像素差异,根据像素差异和第一预设像素差异阈值,从目标图像中确定第一前景图像,根据像素差异和第二预设像素差异阈值,从目标图像中确定第二前景图像,其中,第二预设差异阈值大于第一预设差异阈值,将第一前景图像中与第二前景图像连通的图像确定为目标对象的前景子图像,可有效在目标图像中检测到目标对象的前景子图像,提高运动检测的精准度。
请参见图3,图3是本发明实施例提供的另一种图像处理方法的流程示意图,所述方法可以由图像处理设备执行,其中,图像处理设备的具体解释如前所述。本发明实施例可基于图1所述实施例得到多帧目标图像中目标对象的前景子图像,将各帧前景子图像和目标图像的背景图像进行图像融合,得到曝光图像,提高曝光图像的质量。
S301:根据目标视频对应的图像选取算法,在目标视频中选取至少两帧目标图像。
本发明实施例中,图像处理设备可以预先建立不同视频对应的图像选取算法,在需要对目标视频进行处理时,图像处理设备可以获取目标视频对应的图像选取算法,在目标视频中选取至少两帧目标图像。其中,图像选取算法用于选取目标图像,目标图像可以包括目标对象。例如,图像处理设备可以在目标视频所包含的至少两帧图像中获取各个图像所包含的目标对象的前景子图像。
在一个实施例中,图像处理设备可以获取目标视频的应用场景,根据预先设定的应用场景和图像选取算法的对应关系,获取应用场景对应的图像选取算法,将目标视频作为图像选取算法的输入,得到至少两帧目标图像。
具体地,图像处理设备可以预先建立不同应用场景对应的图像选取算法,在需要对目标视频进行处理时,图像处理设备可以获取目标视频的应用场景,获取该应用场景对应的图像选取算法,图像处理设备可以将该应用场景对应的图像选取算法作为该目标视频对应的图像选取算法,进而将目标视频作为该图像选取算法的输入,将该图像选取算法输出的图像作为至少两帧目标图像。其 中,应用场景可以包括目标对象的运动姿态,例如跳跃姿态、呈现千手观音姿态或者武术动作姿态等。
在一个实施例中,图像选取算法具体可以为:每间隔预设数量帧在目标视频中获取一帧图像,将获取到的图像作为目标图像。其中,预设数量帧可以为预先设定的,例如每间隔三帧或者每间隔五帧等。
例如,目标视频包括10帧图像,图像处理设备可以每间隔二帧在目标视频中获取一帧图像,即图像处理设备可以将第一帧图像、第四帧图像、第七帧图像以及第十帧图像作为目标图像。
示例性地,当目标对象的运动姿态呈现千手观音姿态或者武术动作姿态,则图像处理设备可以确定目标视频的应用场景为第一应用场景,进而获取第一应用场景对应的图像选取算法,将目标视频作为该图像选取算法的输入,图像处理设备可每间隔预设数量帧在目标视频中获取一帧图像,将获取到的图像作为目标图像。
在一个实施例中,图像处理设备可以根据背景图像,在目标视频所包含的每一帧图像中获取前景子图像,根据各个前景子图像的空间信息和时间信息,选取目标前景子图像,将目标前景子图像所属图像确定为目标图像。
例如,目标视频所包含至少两帧图像中目标对象的运动姿态为跳跃姿态,则图像处理设备根据背景图像,在目标视频所包含的每一帧图像中获取前景子图像之后,可以根据各个前景子图像的空间信息和时间信息,选取目标对象的运动姿态为起跳、跳跃至最高点以及落地的前景子图像,并将上述选取的前景子图像作为目标前景子图像,进而将前景子图像所属的图像作为目标图像。
示例性地,当目标对象的运动姿态为跳跃姿态,则图像处理设备可以确定目标视频的应用场景为第二应用场景,进而获取第二应用场景对应的图像选取算法,将目标视频作为该图像选取算法的输入,图像处理设备可根据背景图像,在目标视频所包含的每一帧图像中获取前景子图像,根据各个前景子图像的空间信息和时间信息,选取目标前景子图像,将目标前景子图像所属图像确定为目标图像。
S302:在各帧目标图像中获取目标对象的前景子图像。
本发明实施例中,图像处理设备根据目标视频数据对应的图像选取算法, 在目标视频中选取至少两帧目标图像之后,可以基于图1所示的图像处理方法在各帧目标图像中获取目标对象的前景子图像。
在一个实施例中,图像处理设备在目标图像中获取目标对象的前景子图像之后,可以根据前景子图像的时间信息,在目标视频中获取时间信息大于前景子图像的时间信息的图像,将前景子图像和各个获取到的图像进行图像融合,以对获取到的图像进行更新,根据更新后的图像,对目标视频进行更新,更新后的目标视频包括更新后的图像。
例如,图像处理设备在目标视频中选取了4帧目标图像,分别为目标视频中的第一帧图像、第四帧图像、第七帧图像以及第十帧图像;在第一帧图像中获取到的第一个前景子图像所包含的目标对象的运动姿态为助跑,在第四帧图像中获取到的第二个前景子图像所包含的目标对象的运动姿态为起跳,在第七帧图像中获取到的第三个前景子图像所包含的目标对象的运动姿态为跳跃至最高点,在第十帧图像中获取到的第四个前景子图像所包含的目标对象的运动姿态为落地。图像处理设备可以确定第一个前景子图像的时间信息为第一帧,则目标视频中时间信息大于第一帧的图像为第2-10帧图像,进而将第一个前景子图像分别和第2-10帧图像进行图像融合,得到更新后的第2-10帧图像。同理,图像处理设备可以确定第二个前景子图像的时间信息为第四帧,则目标视频中时间信息大于第四帧的图像为第5-10帧图像,进而将第二个前景子图像分别和上述更新后的第5-10帧图像进行图像融合,得到更新后的第5-10帧图像。同理,图像处理设备可以确定第三个前景子图像的时间信息为第七帧,则目标视频中时间信息大于第七帧的图像为第8-10帧图像,进而将第三个前景子图像分别和上述更新后的第8-10帧图像进行图像融合,得到更新后的第8-10帧图像。图像处理设备可以确定第四个前景子图像的时间信息为第十帧,目标视频中不存在时间信息大于第十帧的图像,则图像处理设备可以对目标视频进行更新,更新后的目标视频包括更新后的图像,例如目标视频包括第一帧图像,以及更新后的第2-10帧图像,其中更新后的第二帧图像为第一个前景子图像和第二帧图像进行图像融合后得到的,更新后的第五帧图像为第一个前景子图像、第二个前景子图像和第五帧图像进行图像融合后得到的,更新后的第八帧图像为第一个前景子图像、第二个前景子图像、第三个前景子图像和第五帧图像进行图像融合后得到的,更新后的第十帧图像为第一个前景子图像、 第二个前景子图像、第三个前景子图像、第四个前景子图像和第五帧图像进行图像融合后得到的。
S303:将各帧前景子图像和目标图像的背景图像进行图像融合,得到曝光图像。
本发明实施例中,图像处理设备可以将所有前景子图像和背景图像进行图像融合,得到曝光图像,曝光图像可以如图2D所示。其中,背景图像可以是图像处理设备对目标视频进行处理得到的,也可以是图像处理设备通过图像采集设备采集、在本地存储器或者通过互联网获取得到的。
在一个实施例中,图像处理设备可以获取各帧前景子图像在前景子图像所属目标图像中的位置,根据位置,将前景子图像和背景图像进行图像融合,得到曝光图像。
例如,第一个前景子图像所包含目标对象位于第一帧图像的右侧,则图像处理设备根据该位置将第一个前景子图像和背景图像进行融合,得到曝光图像,该曝光图像中第一个前景子图像所包含的目标对象位于曝光图像的右侧,且该目标对象与曝光图像各个边缘之间的距离,和该目标对象与第一帧图像对应边缘之间的距离相同。
本发明实施例中,根据目标视频对应的图像选取算法,在目标视频中选取目标图像,在目标图像中获取目标对象的前景子图像,将前景子图像和目标图像的背景图像进行图像融合,得到曝光图像,可有效实现多重曝光,提高曝光图像的质量。
请参见图4,为本发明实施例提供的一种图像处理装置的结构示意图。本实施例中所描述的图像处理装置,包括:
像素差异确定单元401,用于确定目标图像和目标图像的背景图像之间的像素差异;
前景图像确定单元402,用于根据所述像素差异和第一预设像素差异阈值,从所述目标图像中确定第一前景图像;
前景图像确定单元402,还用于根据所述像素差异和第二预设像素差异阈值,从所述目标图像中确定第二前景图像,其中,所述第二预设差异阈值大于 第一预设差异阈值;
前景子图像确定单元403,用于将所述第一前景图像中与所述第二前景图像连通的图像确定为目标对象的前景子图像。
在一个实施例中,所述第二前景图像的数量为一个或多个;
所述前景图像确定单元402根据所述像素差异和第二预设像素差异阈值,从所述目标图像中确定第二前景图像之后,还包括:
前景图像确定单元402将满足预设条件的第二前景图像确定为第二目标前景图像;
所述前景子图像确定单元403将所述第一前景图像中与所述第二前景图像连通的图像确定为所述目标对象的前景子图像包括:
将所述第一前景图像中与所述第二目标前景图像连通的图像确定为所述目标对象的前景子图像。
在一个实施例中,所述前景图像确定单元402将满足预设条件的第二前景图像确定为第二目标前景图像,包括:
将面积大于或等于预设面积阈值的第二前景图像确定为所述第二目标前景图像。
在一个实施例中,所述图像处理装置还可以包括:
识别单元404,用于对所述目标图像中的目标对象进行识别,以获取所述目标对象的检测框;
所述前景图像确定单元402将满足预设条件的第二前景图像确定为第二目标前景图像包括:
将和所述检测框满足预设位置关系的第二前景图像确定为所述第二目标前景图像。
在一个实施例中,所述识别单元404对所述目标图像中的目标对象进行识别,以获取所述目标对象的检测框,包括:
通过神经网络模型对所述目标图像中的目标对象进行识别,以获取所述目标对象的检测框。
在一个实施例中,所述前景图像确定单元402将和所述检测框满足预设位置关系的第二前景图像确定为所述第二目标前景图像,包括:
将在所述检测框内的第二前景图像确定为所述第二目标前景图像。
在一个实施例中,所述前景图像确定单元402将和所述检测框满足预设位置关系的第二前景图像确定为所述第二目标前景图像,包括:
将和所述检测框之间的距离小于或等于预设距离阈值的第二前景图像确定为所述第二目标前景图像。
在一个实施例中,所述第一前景图像的数量为一个或多个,所述图像处理装置还可以包括:
识别单元404,用于所述前景图像确定单元402对所述目标图像中的目标对象进行识别;
前景子图像确定单元403,还用于当通过所述识别获取不到目标对象的检测框时,将面积最大的第一前景图像确定为所述目标对象的前景子图像。
在一个实施例中,图像处理装置还可以包括:
图像选取单元405,用于在确定所述目标图像和所述目标图像的背景图像之间的像素差异之前,在目标视频中选取多帧目标图像;
图像融合单元406,用于在确定各帧所述目标图像中目标对象的前景子图像之后,将各帧所述前景子图像和所述目标图像的背景图像进行图像融合,得到曝光图像。
在一个实施例中,所述图像融合单元406将各帧所述前景子图像和所述目标图像的背景图像进行图像融合,得到曝光图像,包括:
获取各帧所述前景子图像在所述前景子图像所属目标图像中的位置;
根据所述位置,将所述前景子图像和所述目标图像的背景图像进行图像融合,得到所述曝光图像。
在一个实施例中,图像处理装置还可以包括:
背景图像获取单元407,用于像素差异确定单元401确定目标图像和目标图像的背景图像之间的像素差异之前,对所述目标视频进行处理,得到所述背景图像。
本发明实施例中像素差异确定单元401确定目标图像和目标图像的背景图像之间的像素差异,前景图像确定单元402根据像素差异和第一预设像素差异阈值,从目标图像中确定第一前景图像,前景图像确定单元402根据像素差异和第二预设像素差异阈值,从目标图像中确定第二前景图像,前景子图像确定单元403将第一前景图像中与第二前景图像连通的图像确定为目标对象的 前景子图像,可有效在目标图像中检测到目标对象的前景子图像,提高运动检测的精准度。
请参见图5,图5是本发明实施例提供的一种图像处理设备的结构示意图。具体的,所述图像处理设备包括:存储器501、处理器502、用户接口503以及数据接口504,其中,所述用户接口503用于输出前景子图像或者目标视频。
所述存储器501可以包括易失性存储器(volatile memory);存储器501也可以包括非易失性存储器(non-volatile memory);存储器501还可以包括上述种类的存储器的组合。所述处理器502可以是中央处理器(central processing unit,CPU)。所述处理器502还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA)或其任意组合。
可选地,所述存储器501用于存储程序指令。所述处理器502可以调用存储器501中存储的程序指令,用于执行如下步骤:
确定目标图像和目标图像的背景图像之间的像素差异;
根据所述像素差异和第一预设像素差异阈值,从所述目标图像中确定第一前景图像;
根据所述像素差异和第二预设像素差异阈值,从所述目标图像中确定第二前景图像,其中,所述第二预设差异阈值大于第一预设差异阈值;
将所述第一前景图像中与所述第二前景图像连通的图像确定为所述目标对象的前景子图像。
在一个实施例中,所述第二前景图像的数量为一个或多个;
所述处理器502,还用于根据所述像素差异和第二预设像素差异阈值,从所述目标图像中确定第二前景图像之后,将满足预设条件的第二前景图像确定为第二目标前景图像;
所述处理器502,用于将所述第一前景图像中与所述第二目标前景图像连通的图像确定为所述目标对象的前景子图像。
在一个实施例中,所述处理器502,用于将面积大于或等于预设面积阈值 的第二前景图像确定为所述第二目标前景图像。
在一个实施例中,所述处理器502,还用于对所述目标图像中的目标对象进行识别,以获取所述目标对象的检测框;
所述处理器502,用于将和所述检测框满足预设位置关系的第二前景图像确定为所述第二目标前景图像。
在一个实施例中,所述处理器502,用于通过神经网络模型对所述目标图像中的目标对象进行识别,以获取所述目标对象的检测框。
在一个实施例中,所述处理器502,用于将在所述检测框内的第二前景图像确定为所述第二目标前景图像。
在一个实施例中,所述处理器502,用于将和所述检测框之间的距离小于或等于预设距离阈值的第二前景图像确定为所述第二目标前景图像。
在一个实施例中,所述第一前景图像的数量为一个或多个;
所述处理器502,还用于对所述目标图像中的目标对象进行识别,当通过所述识别获取不到目标对象的检测框时,将面积最大的第一前景图像确定为所述目标对象的前景子图像。
在一个实施例中,所述处理器502,还用于在确定所述目标图像和所述目标图像的背景图像之间的像素差异之前,在目标视频中选取多帧目标图像,在确定各帧所述目标图像中目标对象的前景子图像之后,将各帧所述前景子图像和所述目标图像的背景图像进行图像融合,得到曝光图像。
在一个实施例中,所述处理器502,用于获取各帧所述前景子图像在所述前景子图像所属目标图像中的位置,根据所述位置,将所述前景子图像和所述目标图像的背景图像进行图像融合,得到所述曝光图像。
在一个实施例中,所述处理器502,还用于确定目标图像和目标图像的背景图像之间的像素差异之前,对所述目标视频进行处理,得到所述背景图像。
本发明实施例的所述处理器501的具体实现可参考上述各个实施例中相关内容的描述,在此不赘述。
本发明实施例还提供了一种无人机,包括:机身;设置在机身上的动力***,用于提供飞行动力;处理器,用于确定目标图像和目标图像的背景图像之间的像素差异;根据所述像素差异和第一预设像素差异阈值,从所述目标图像 中确定第一前景图像;根据所述像素差异和第二预设像素差异阈值,从所述目标图像中确定第二前景图像,其中,所述第二预设差异阈值大于第一预设差异阈值;将所述第一前景图像中与所述第二前景图像连通的图像确定为所述目标对象的前景子图像。
在一个实施例中,所述第二前景图像的数量为一个或多个;
所述处理器,还用于根据所述像素差异和第二预设像素差异阈值,从所述目标图像中确定第二前景图像之后,将满足预设条件的第二前景图像确定为第二目标前景图像;将所述第一前景图像中与所述第二目标前景图像连通的图像确定为所述目标对象的前景子图像。
在一个实施例中,所述处理器,用于将面积大于或等于预设面积阈值的第二前景图像确定为所述第二目标前景图像。
在一个实施例中,所述处理器,还用于对所述目标图像中的目标对象进行识别,以获取所述目标对象的检测框;将和所述检测框满足预设位置关系的第二前景图像确定为所述第二目标前景图像。
在一个实施例中,所述处理器,用于通过神经网络模型对所述目标图像中的目标对象进行识别,以获取所述目标对象的检测框。
在一个实施例中,所述处理器,用于将在所述检测框内的第二前景图像确定为所述第二目标前景图像。
在一个实施例中,所述处理器,用于将和所述检测框之间的距离小于或等于预设距离阈值的第二前景图像确定为所述第二目标前景图像。
在一个实施例中,所述第一前景图像的数量为一个或多个;
所述处理器,还用于对所述目标图像中的目标对象进行识别,当通过所述识别获取不到目标对象的检测框时,将面积最大的第一前景图像确定为所述目标对象的前景子图像。
在一个实施例中,所述处理器,还用于在确定所述目标图像和所述目标图像的背景图像之间的像素差异之前,在目标视频中选取多帧目标图像,在确定各帧所述目标图像中目标对象的前景子图像之后,将各帧所述前景子图像和所述目标图像的背景图像进行图像融合,得到曝光图像。
在一个实施例中,所述处理器,用于获取各帧所述前景子图像在所述前景子图像所属目标图像中的位置,根据所述位置,将所述前景子图像和所述目标 图像的背景图像进行图像融合,得到所述曝光图像。
在一个实施例中,所述处理器,还用于确定目标图像和目标图像的背景图像之间的像素差异之前,对所述目标视频进行处理,得到所述背景图像。
所述无人机中处理器的具体实现可参考上述图1或图3所对应实施例的图像处理方法,在此不再赘述。其中,无人机可以是四旋翼无人机、六旋翼无人机、多旋翼无人机等类型的飞行器。所述动力***可以包括电机、电调、螺旋桨等结构,其中,电机负责带动飞行器螺旋桨,电调负责控制飞行器的电机的转速。
在本发明的实施例中还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现本发明图1或图3所对应实施例中描述的图像处理方法方式,也可实现图5所述本发明所对应实施例的图像处理设备,在此不再赘述。
所述计算机可读存储介质可以是前述任一实施例所述的设备的内部存储单元,例如设备的硬盘或内存。所述计算机可读存储介质也可以是所述设备的外部存储设备,例如所述设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述计算机可读存储介质还可以既包括所述设备的内部存储单元也包括外部存储设备。所述计算机可读存储介质用于存储所述计算机程序以及所述终端所需的其他程序和数据。所述计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。
Claims (35)
- 一种图像处理方法,其特征在于,所述方法包括:确定目标图像和所述目标图像的背景图像之间的像素差异;根据所述像素差异和第一预设像素差异阈值,从所述目标图像中确定第一前景图像;根据所述像素差异和第二预设像素差异阈值,从所述目标图像中确定第二前景图像,其中,所述第二预设差异阈值大于第一预设差异阈值;将所述第一前景图像中与所述第二前景图像连通的图像确定为目标对象的前景子图像。
- 根据权利要求1所述的方法,其特征在于,所述第二前景图像的数量为一个或多个;所述根据所述像素差异和第二预设像素差异阈值,从所述目标图像中确定第二前景图像之后,还包括:将满足预设条件的第二前景图像确定为第二目标前景图像;所述将所述第一前景图像中与所述第二前景图像连通的图像确定为所述目标对象的前景子图像包括:将所述第一前景图像中与所述第二目标前景图像连通的图像确定为所述目标对象的前景子图像。
- 根据权利要求2所述的方法,其特征在于,所述将满足预设条件的第二前景图像确定为第二目标前景图像,包括:将面积大于或等于预设面积阈值的第二前景图像确定为所述第二目标前景图像。
- 根据权利要求2所述的方法,其特征在于,所述方法还包括:对所述目标图像中的目标对象进行识别,以获取所述目标对象的检测框;所述将满足预设条件的第二前景图像确定为第二目标前景图像包括:将和所述检测框满足预设位置关系的第二前景图像确定为所述第二目标前景图像。
- 根据权利要求4所述的方法,其特征在于,所述对所述目标图像中的目标对象进行识别,以获取所述目标对象的检测框,包括:通过神经网络模型对所述目标图像中的目标对象进行识别,以获取所述目标对象的检测框。
- 根据权利要求4或5所述的方法,其特征在于,所述将和所述检测框满足预设位置关系的第二前景图像确定为所述第二目标前景图像,包括:将在所述检测框内的第二前景图像确定为所述第二目标前景图像。
- 根据权利要求4或5所述的方法,其特征在于,所述将和所述检测框满足预设位置关系的第二前景图像确定为所述第二目标前景图像,包括:将和所述检测框之间的距离小于或等于预设距离阈值的第二前景图像确定为所述第二目标前景图像。
- 根据权利要求1-7任一项所述的方法,其特征在于,所述第一前景图像的数量为一个或多个,所述方法还包括:对所述目标图像中的目标对象进行识别;当通过所述识别获取不到目标对象的检测框时,将面积最大的第一前景图像确定为所述目标对象的前景子图像。
- 根据权利要求1-8任一项所述的方法,其特征在于,所述方法还包括:在确定所述目标图像和所述目标图像的背景图像之间的像素差异之前,在目标视频中选取多帧目标图像;在确定各帧所述目标图像中目标对象的前景子图像之后,将各帧所述前景子图像和所述目标图像的背景图像进行图像融合,得到曝光图像。
- 根据权利要求9所述的方法,其特征在于,所述将各帧所述前景子图像和所述目标图像的背景图像进行图像融合,得到曝光图像,包括:获取各帧所述前景子图像在所述前景子图像所属目标图像中的位置;根据所述位置,将所述前景子图像和所述目标图像的背景图像进行图像融合,得到所述曝光图像。
- 根据权利要求9所述的方法,其特征在于,所述确定目标图像和所述目标图像的背景图像之间的像素差异之前,还包括:对所述目标视频进行处理,得到所述背景图像。
- 一种图像处理装置,其特征在于,所述装置包括用于执行如权利要求1-11任一项所述的图像处理方法的单元。
- 一种图像处理设备,其特征在于,包括存储器和处理器;所述存储器,用于存储程序指令;所述处理器,执行所述存储器存储的程序指令,当程序指令被执行时,所述处理器用于执行如下步骤:确定目标图像和所述目标图像的背景图像之间的像素差异;根据所述像素差异和第一预设像素差异阈值,从所述目标图像中确定第一前景图像;根据所述像素差异和第二预设像素差异阈值,从所述目标图像中确定第二前景图像,其中,所述第二预设差异阈值大于第一预设差异阈值;将所述第一前景图像中与所述第二前景图像连通的图像确定为目标对象的前景子图像。
- 根据权利要求13所述的设备,其特征在于,所述第二前景图像的数量为一个或多个;所述处理器,还用于根据所述像素差异和第二预设像素差异阈值,从所述目标图像中确定第二前景图像之后,将满足预设条件的第二前景图像确定为第二目标前景图像;所述处理器,用于将所述第一前景图像中与所述第二目标前景图像连通的图像确定为所述目标对象的前景子图像。
- 根据权利要求14所述的设备,其特征在于,所述处理器,用于将面积大于或等于预设面积阈值的第二前景图像确定为所述第二目标前景图像。
- 根据权利要求14所述的设备,其特征在于,所述处理器,还用于对所述目标图像中的目标对象进行识别,以获取所述目标对象的检测框;所述处理器,用于将和所述检测框满足预设位置关系的第二前景图像确定为所述第二目标前景图像。
- 根据权利要求16所述的设备,其特征在于,所述处理器,用于通过神经网络模型对所述目标图像中的目标对象进行识别,以获取所述目标对象的检测框。
- 根据权利要求16或17所述的设备,其特征在于,所述处理器,用于将在所述检测框内的第二前景图像确定为所述第二目标前景图像。
- 根据权利要求16或17所述的设备,其特征在于,所述处理器,用于将和所述检测框之间的距离小于或等于预设距离阈值的第二前景图像确定为所述第二目标前景图像。
- 根据权利要求13-19任一项所述的设备,其特征在于,所述第一前景图像的数量为一个或多个;所述处理器,还用于对所述目标图像中的目标对象进行识别,当通过所述识别获取不到目标对象的检测框时,将面积最大的第一前景图像确定为所述目标对象的前景子图像。
- 根据权利要求13-20任一项所述的设备,其特征在于,所述处理器,还用于在确定所述目标图像和所述目标图像的背景图像之间 的像素差异之前,在目标视频中选取多帧目标图像,在确定各帧所述目标图像中目标对象的前景子图像之后,将各帧所述前景子图像和所述目标图像的背景图像进行图像融合,得到曝光图像。
- 根据权利要求21所述的设备,其特征在于,所述处理器,用于获取各帧所述前景子图像在所述前景子图像所属目标图像中的位置,根据所述位置,将所述前景子图像和所述目标图像的背景图像进行图像融合,得到所述曝光图像。
- 根据权利要求21所述的设备,其特征在于,所述处理器,还用于确定所述目标图像和所述目标图像的背景图像之间的像素差异之前,对所述目标视频进行处理,得到所述背景图像。
- 一种无人机,其特征在于,包括:机身;设置在机身上的动力***,用于提供飞行动力;处理器,用于确定目标图像和所述目标图像的背景图像之间的像素差异;根据所述像素差异和第一预设像素差异阈值,从所述目标图像中确定第一前景图像;根据所述像素差异和第二预设像素差异阈值,从所述目标图像中确定第二前景图像,其中,所述第二预设差异阈值大于第一预设差异阈值;将所述第一前景图像中与所述第二前景图像连通的图像确定为目标对象的前景子图像。
- 根据权利要求24所述的无人机,其特征在于,所述处理器,还用于根据所述像素差异和第二预设像素差异阈值,从所述目标图像中确定第二前景图像之后,将满足预设条件的第二前景图像确定为第二目标前景图像,所述第二前景图像的数量为一个或多个;所述处理器,用于将所述第一前景图像中与所述第二目标前景图像连通的图像确定为所述目标对象的前景子图像。
- 根据权利要求25所述的无人机,其特征在于,所述处理器,用于将面积大于或等于预设面积阈值的第二前景图像确定为所述第二目标前景图像。
- 根据权利要求25所述的无人机,其特征在于,所述处理器,还用于对所述目标图像中的目标对象进行识别,以获取所述目标对象的检测框;所述处理器,用于将和所述检测框满足预设位置关系的第二前景图像确定为所述第二目标前景图像。
- 根据权利要求27所述的无人机,其特征在于,所述处理器,用于将在所述检测框内的第二前景图像确定为所述第二目标前景图像。
- 根据权利要求27所述的无人机,其特征在于,所述处理器,用于将和所述检测框之间的距离小于或等于预设距离阈值的第二前景图像确定为所述第二目标前景图像。
- 根据权利要求24-29任一项所述的无人机,其特征在于,所述第一前景图像的数量为一个或多个;所述处理器,还用于对所述目标图像中的目标对象进行识别,当通过所述识别获取不到目标对象的检测框时,将面积最大的第一前景图像确定为所述目标对象的前景子图像。
- 根据权利要求24-30任一项所述的无人机,其特征在于,所述处理器,还用于在确定所述目标图像和所述目标图像的背景图像之间的像素差异之前,在目标视频中选取多帧目标图像,在确定各帧所述目标图像中目标对象的前景子图像之后,将各帧所述前景子图像和所述目标图像的背景图像进行图像融合,得到曝光图像。
- 根据权利要求31所述的无人机,其特征在于,所述处理器,用于获取各帧所述前景子图像在所述前景子图像所属目标图像中的位置,根据所述位置,将所述前景子图像和所述目标图像的背景图像进行图像融合,得到所述曝光图像。
- 根据权利要求31所述的无人机,其特征在于,所述处理器,还用于确定所述目标图像和所述目标图像的背景图像之间的像素差异之前,对所述目标视频进行处理,得到所述背景图像。
- 根据权利要求27或30所述的无人机,其特征在于,所述处理器,用于通过神经网络模型对所述目标图像中的目标对象进行识别。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至11任一项所述方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2018/093390 WO2020000311A1 (zh) | 2018-06-28 | 2018-06-28 | 图像处理方法、装置、设备以及无人机 |
CN201880036945.5A CN110870296A (zh) | 2018-06-28 | 2018-06-28 | 图像处理方法、装置、设备以及无人机 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2018/093390 WO2020000311A1 (zh) | 2018-06-28 | 2018-06-28 | 图像处理方法、装置、设备以及无人机 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020000311A1 true WO2020000311A1 (zh) | 2020-01-02 |
Family
ID=68985713
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/093390 WO2020000311A1 (zh) | 2018-06-28 | 2018-06-28 | 图像处理方法、装置、设备以及无人机 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110870296A (zh) |
WO (1) | WO2020000311A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111741259B (zh) * | 2020-06-11 | 2022-05-06 | 北京三快在线科技有限公司 | 无人驾驶设备的控制方法及装置 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2000034919A1 (en) * | 1998-12-04 | 2000-06-15 | Interval Research Corporation | Background estimation and segmentation based on range and color |
US20040114799A1 (en) * | 2001-12-12 | 2004-06-17 | Xun Xu | Multiple thresholding for video frame segmentation |
CN102737370A (zh) * | 2011-04-02 | 2012-10-17 | 株式会社理光 | 检测图像前景的方法及设备 |
CN103425958A (zh) * | 2012-05-24 | 2013-12-04 | 信帧电子技术(北京)有限公司 | 一种视频中不动物检测的方法 |
CN105069808A (zh) * | 2015-08-31 | 2015-11-18 | 四川虹微技术有限公司 | 基于图像分割的视频图像深度估计方法 |
CN107920213A (zh) * | 2017-11-20 | 2018-04-17 | 深圳市堇茹互动娱乐有限公司 | 视频合成方法、终端和计算机可读存储介质 |
-
2018
- 2018-06-28 WO PCT/CN2018/093390 patent/WO2020000311A1/zh active Application Filing
- 2018-06-28 CN CN201880036945.5A patent/CN110870296A/zh active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2000034919A1 (en) * | 1998-12-04 | 2000-06-15 | Interval Research Corporation | Background estimation and segmentation based on range and color |
US20040114799A1 (en) * | 2001-12-12 | 2004-06-17 | Xun Xu | Multiple thresholding for video frame segmentation |
CN102737370A (zh) * | 2011-04-02 | 2012-10-17 | 株式会社理光 | 检测图像前景的方法及设备 |
CN103425958A (zh) * | 2012-05-24 | 2013-12-04 | 信帧电子技术(北京)有限公司 | 一种视频中不动物检测的方法 |
CN105069808A (zh) * | 2015-08-31 | 2015-11-18 | 四川虹微技术有限公司 | 基于图像分割的视频图像深度估计方法 |
CN107920213A (zh) * | 2017-11-20 | 2018-04-17 | 深圳市堇茹互动娱乐有限公司 | 视频合成方法、终端和计算机可读存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN110870296A (zh) | 2020-03-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110866480B (zh) | 对象的跟踪方法及装置、存储介质、电子装置 | |
US10416667B2 (en) | System and method for utilization of multiple-camera network to capture static and/or motion scenes | |
US11748898B2 (en) | Methods and system for infrared tracking | |
US20200349687A1 (en) | Image processing method, device, unmanned aerial vehicle, system, and storage medium | |
CN105144710B (zh) | 用于增加深度相机图像的精度的技术 | |
WO2019085621A1 (zh) | 目标追踪方法、装置及追踪器 | |
JP7516675B2 (ja) | ポーズ推定方法及び関連する装置 | |
US20210103299A1 (en) | Obstacle avoidance method and device and movable platform | |
CN108702463B (zh) | 一种图像处理方法、装置以及终端 | |
WO2019227438A1 (zh) | 一种图像处理方法、设备、飞行器、***及存储介质 | |
CN112602319B (zh) | 一种对焦装置、方法及相关设备 | |
WO2021168804A1 (zh) | 图像处理方法、图像处理装置和图像处理*** | |
JP2014222825A (ja) | 映像処理装置および映像処理方法 | |
CN112640419B (zh) | 跟随方法、可移动平台、设备和存储介质 | |
EP3893489A1 (en) | Image processing method and device, and unmanned aerial vehicle | |
CN113139419B (zh) | 一种无人机检测方法及装置 | |
CN112136312A (zh) | 一种获取目标距离的方法、控制装置及移动平台 | |
WO2020000311A1 (zh) | 图像处理方法、装置、设备以及无人机 | |
US11964775B2 (en) | Mobile object, information processing apparatus, information processing method, and program | |
WO2020232672A1 (zh) | 图像裁剪方法、装置和拍摄装置 | |
WO2020061789A1 (zh) | 一种图像处理方法、设备、无人机、***及存储介质 | |
CN112329729B (zh) | 小目标船只检测方法、装置及电子设备 | |
AU2013263838A1 (en) | Method, apparatus and system for classifying visual elements | |
CN111580546B (zh) | 无人机自动返航方法和装置 | |
US20230206467A1 (en) | Methods for selecting key-points for real-time tracking in a mobile environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18923889 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18923889 Country of ref document: EP Kind code of ref document: A1 |