A method for identifying green plants in video images

By using blue gain and red gain in the video surveillance system to determine the color gain area of ​​the video image block, and combining the hue and saturation value of the HSV color space to identify and reduce the code rate of the green plant area, the video surveillance system is solved. The problem of wasting bandwidth for coding in green plant areas during encoding has achieved bandwidth saving.

CN114565874BActive Publication Date: 2024-12-03HANGZHOU TUYA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210189727.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-28
Publication Date
2024-12-03
Estimated Expiration
2042-02-28

AI Technical Summary

Technical Problem

When encoding outdoor scene videos, existing video surveillance systems cannot effectively identify and process green plant areas, resulting in the encoder wasting bandwidth to describe meaningless motion information.

Method used

By acquiring the video images in the video stream, dividing them into multiple image blocks, and using blue gain and red gain to determine whether the image block is in the color gain region in the color gain coordinate system, and at the same time, judging the hue and saturation in the HSV color space Whether the value is within the preset range, determine whether the image block belongs to the green plant area, thereby reducing the code rate of the green plant area.

Benefits of technology

Effectively identify the green plant areas in the video image, reduce the encoding of meaningless motion information, and save bandwidth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114565874B_ABST
    Figure CN114565874B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a method for identifying green plants in video images, which is used in the field of video surveillance. The method of the embodiment of the present application includes: obtaining a gain coordinate system trained by each first image block in the green object image, the gain coordinate system includes a color gain area, and dividing the video image in the video stream into multiple second image blocks; judging whether the second image block is located in the color gain area according to the blue gain and red gain of the second image block, and obtaining a first judgment result; and / or, obtaining a second judgment result according to whether the hue value of the second image block is within a first preset range and whether the saturation value of the second image block is within a second preset range. According to the first judgment result and / or the second judgment result, it can be effectively determined whether the second image block belongs to the image area of ​​green plants, thereby locating the green plants in the video image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of video surveillance, and in particular to a method for identifying green plants in video images. Background Art

[0002] The existing video surveillance system consists of a real-time control system, a monitoring system and a management information system. The real-time control system completes the functions of real-time data acquisition, processing, storage and feedback; the monitoring system completes all-weather monitoring of each monitoring point and can switch multiple images at multiple operation control points; the management information system completes the acquisition, reception, transmission, processing and handling of various required information and is the control core of the entire system.

[0003] With the rapid development of video surveillance systems, video resolution is constantly increasing, high-definition video technology is rapidly becoming popular, and 4K resolution has been widely used in the video surveillance industry. The transmission of high-resolution video will inevitably bring great pressure to the network. Therefore, how to improve the compression rate of the video without losing effective video information has become a key issue in the field of video encoding. The human visual system is not interested in all areas of the picture, so it is possible to filter out redundant information that is not of interest in the image as much as possible and reduce the bit rate of non-interesting areas in the picture to achieve the purpose of reducing the bit rate and saving bandwidth.

[0004] Most of the existing video surveillance applications are outdoor scenes. In outdoor surveillance scenes, green plants such as trees and grass swaying in the wind will also destroy the temporal redundancy of the video, causing the encoder to have to describe this meaningless motion information, wasting bandwidth in vain. Therefore, in order to reduce bandwidth waste, it is necessary to identify green plants in video images of outdoor scene videos to reduce the amount of data after encoding the image area corresponding to the green plants. However, existing video encoding technologies usually use a series of complex image processing methods such as corrosion, expansion, sharpening, filtering, and noise reduction to locate the region of interest on the original image, but most of the located regions of interest are some specific target objects such as pedestrians and vehicles, but cannot locate green plants in video images. Summary of the invention

[0005] The present application embodiment provides a method for identifying green plant areas in outdoor videos.

[0006] The present application embodiment provides a method for identifying green plants in a video image, including:

[0007] Acquire a video stream to be identified, wherein at least one frame of video image in the video stream includes green plants;

[0008] Acquire a gain coordinate system trained by each first image block in a green object image, wherein two coordinate axes of the gain coordinate system are blue gain and red gain respectively, and the gain coordinate system includes a color gain region, and the color gain region is obtained by the distribution position of each first image block in the gain coordinate system, and the distribution position of the first image block in the gain coordinate system is determined by the red gain value and the blue gain value of the first image block;

[0009] Dividing the video image in the video stream into a plurality of second image blocks;

[0010] Determine whether the second image block is located in the color gain area according to the blue gain and the red gain of the second image block, and obtain a first determination result; and / or determine whether the hue value is within a first preset range and the saturation value is within a second preset range according to the hue value and the saturation value of the second image block in the HSV color space, and obtain a second determination result;

[0011] According to the first judgment result and / or the second judgment result, it is determined whether the second image block belongs to the image area of ​​the green plant.

[0012] Further, dividing the video image in the video stream into a plurality of second image blocks comprises:

[0013] Determining a video image in the video stream that does not contain a preset target object as a target video image;

[0014] The target video image in the video stream is divided into a plurality of the second image blocks.

[0015] Furthermore, the method further comprises:

[0016] If it is determined that the second image block belongs to the image area of ​​the green plant, marking the second image block on the video image;

[0017] The video image marked with the second image block is displayed.

[0018] Furthermore, the method further comprises:

[0019] If it is determined that the second image block belongs to the image area of ​​the green plant, the bit rate of the second image block is reduced.

[0020] Furthermore, before acquiring the gain coordinate system obtained by training each first image block in the green object image, the method further includes:

[0021] Obtain a first average value of RGB three-channel components of each pixel point in the first image block;

[0022] A blue gain and a red gain of the first image block are calculated according to the first average value.

[0023] Further, judging whether the second image block is located in the color gain area according to the blue gain and the red gain of the second image block includes:

[0024] Obtain a second average value of RGB three-channel components of pixels in the second image block;

[0025] Calculating a blue gain and a red gain of the second image block according to the second average value;

[0026] Obtaining a target gain coordinate point on the gain coordinate system according to the blue gain and the red gain of the second image block;

[0027] It is determined whether the target gain coordinate point is located in the color gain area, and then whether the second image block is located in the color gain area.

[0028] Furthermore, before judging whether the hue value is within a first preset range and the saturation value is within a second preset range according to the hue value and saturation value of the second image block in the HSV color space, the method further includes:

[0029] Performing color correction on the second image block according to a preset algorithm;

[0030] The color-corrected second image block is converted into the HSV color space to obtain the hue value and saturation value of the second image block in the HSV color space.

[0031] The present application also provides an image processing device, including:

[0032] A first acquisition unit is used to acquire a video stream to be identified, wherein at least one frame of video image in the video stream includes green plants;

[0033] a second acquisition unit, configured to acquire a gain coordinate system obtained by training each first image block in a green object image, wherein two coordinate axes of the gain coordinate system are blue gain and red gain respectively, and the gain coordinate system includes a color gain region, and the color gain region is obtained by a distribution position of each first image block in the gain coordinate system, and the distribution position of the first image block in the gain coordinate system is determined by a red gain value and a blue gain value of the first image block;

[0034] A dividing unit, configured to divide the video image in the video stream into a plurality of second image blocks;

[0035] a first execution unit, configured to determine whether the second image block is located in the color gain region according to the blue gain and the red gain of the second image block, to obtain a first determination result; and / or a second execution unit, configured to determine whether the hue value is within a first preset range and the saturation value is within a second preset range according to the hue value and the saturation value of the second image block in the HSV color space, to obtain a second determination result;

[0036] A determination unit is used to determine whether the second image block belongs to the image area of ​​the green plant according to the first judgment result and / or the second judgment result.

[0037] The present application also provides an image processing device, including:

[0038] CPU, memory, input and output interfaces, wired or wireless network interfaces, and power supply;

[0039] The memory is a short-term storage memory or a persistent storage memory;

[0040] The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the above-mentioned identification method.

[0041] An embodiment of the present application further provides a computer-readable storage medium, which includes instructions. When the instructions are executed on a computer, the computer executes the above-mentioned identification method.

[0042] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0043] Through the first judgment result and / or the second judgment result, it can be effectively determined whether the second image block in the video image belongs to the image area of ​​the green plant, and then the green plant in the video image can be located. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0045] Figure 1 A schematic diagram of the structure of a video surveillance system disclosed in an embodiment of the present application;

[0046] Figure 2 A green plant identification flow chart disclosed in an embodiment of the present application;

[0047] Figure 3Another green plant identification flow chart disclosed in the embodiment of the present application;

[0048] Figure 4 A gain coordinate system diagram disclosed in an embodiment of the present application;

[0049] Figure 5 A schematic diagram of an image processing device disclosed in an embodiment of the present application;

[0050] Figure 6 Schematic diagram of another image processing device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0052] In the description of the embodiments of the present application, it should be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they cannot be understood as limitations on the embodiments of the present application.

[0053] In the description of the embodiments of the present application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments of the present application can be understood according to specific circumstances.

[0054] See below Figure 1A video surveillance system mainly includes an image processing device 101 and a video surveillance device 102. The image processing device 101 is connected to the video surveillance device 102 through a network. The network connection can be through a wired network or a wireless network, which is not limited here. The video surveillance device 102 monitors the corresponding environmental scene, collects the video of the monitored environmental scene, and sends the video of the environmental scene to the image processing device 101. The image processing device 101 identifies and processes the received video, and then displays the processed video. It can be understood that an image processing device 101 is connected to a plurality of video surveillance devices 102 through a network, receives videos sent by a plurality of video surveillance devices 102, and displays these videos after processing. The processing can be to fade or highlight the video image in the video, which is not limited here. Furthermore, the video surveillance device 102 can also be an electronic eye, or a device with a video acquisition function, which is not limited here.

[0055] Most of the scenes used in existing video surveillance are outdoor scenes. In outdoor surveillance scenes, green plants such as trees and grass swaying in the wind will also destroy the temporal redundancy of the video. However, existing video encoding technology usually uses a series of complex image processing methods such as corrosion, expansion, sharpening, filtering, and noise reduction to locate the area of ​​interest on the original image. The area of ​​interest is mainly pedestrians or vehicles, and green plants such as trees and grass are not identified. Therefore, a method for identifying green plants in videos is proposed in the embodiment of the present application, which can effectively identify green plants in video images. Please refer to the following. Figure 2 , a green plant identification process provided in an embodiment of the present application includes steps 201 to 206:

[0056] 201. Obtain a video stream to be identified.

[0057] The image processing device obtains a video stream to be identified, in which at least one frame of video image contains green plants such as trees or grass. Specifically, the video surveillance device monitors the outdoor scene, obtains the monitored outdoor scene video, and sends the outdoor scene video to the image processing device. It can be understood that the video surveillance image can monitor the outdoor scene in real time or irregularly, and the specific details are not limited here. The outdoor scene mainly refers to the outdoor environment scene that is different from the indoor environment; most of the outdoor environment scenes are environments without obstacles such as walls, and the outdoor environment scenes generally contain at least some green plants such as trees or grass. For example, a video surveillance device installed on a house for monitoring the outside of the house generally monitors the outdoors. When the video surveillance device is aimed at a section of road outside the house, the collected surveillance video mainly contains trees, vehicles, pedestrians or grass within the range of the section of road.

[0058] In the real-time example of the present application, the main purpose is to identify green plants in the video image, so the video monitoring device generally refers to a monitoring device for monitoring outdoor scenes, and the monitored images include green plants in the outdoor scene.

[0059] 202. Obtain a color gain region obtained by training each first image block in the green object image.

[0060] In order to effectively identify green plants in the video, the image processing device needs to first collect green object images under a variety of standard color temperature light sources. It can be understood that the green object image mainly refers to an object image containing green color. The object image generally refers to the presence of one color: green. The object image can be a green tablecloth, green grass, etc., which is not limited here.

[0061] The image processing device divides the green object image into a plurality of first image blocks, and the sizes of the first image blocks are generally the same, that is, the green object image is divided into M×N first image blocks of the same size, and the M can be 6 or 7, which is not specifically limited here; the N can be 8 or 9, which is not specifically limited here; M and N can also be the same value. The image processing device constructs a gain coordinate system (which can be called a B / GR / G coordinate system), and the two coordinate axes of the gain coordinate system are blue gain B / G and red gain R / G. It can be understood that the horizontal coordinate of the gain coordinate system can be blue gain B / G or red gain R / G, and the vertical coordinate corresponding to the gain coordinate system is red gain R / G or blue gain B / G. The image processing device calculates the blue gain and red gain corresponding to the plurality of first image blocks, and according to the blue gain and red gain of the plurality of first image blocks, the distribution positions of the plurality of first image blocks on the gain coordinate system can be determined respectively, and the color gain area (which can be called a green area) on the gain coordinate system can be obtained according to these distribution positions.

[0062] It is understandable that each image block can be set as a statistical point, and according to the distribution of statistical points in the B / GR / G coordinate system under different standard color temperature light sources, a rectangular box that can contain the statistical points is drawn, which is the green area, such as Figure 4 Specifically, the drawn rectangular frame may be a rectangular frame in which the statistical points of multiple first image blocks belonging to the same green object image are drawn as one rectangular frame, and different rectangular frames are drawn for the statistical points belonging to different green object images; or the statistical points of multiple green object images may be determined, and then the rectangular frames are drawn according to all the statistical points, which is not limited here.

[0063] It should be noted that the order of step 201 and step 202 is not limited.

[0064] 203. Divide the video image in the video stream into multiple second image blocks.

[0065] After receiving the video stream from the video surveillance device, the image processing device divides the video image in the video stream into multiple second image blocks. Generally, for more accurate comparison, the image processing device divides the video image in the video stream into M×N second image blocks of the same size as the first image block.

[0066] It can be understood that the image processing device divides the video image in the video stream into multiple second image blocks, which means dividing a frame of video image in the video stream into multiple second image blocks corresponding to the frame of video image. The video stream generally contains multiple frames of video images, and the image processing device determines the video images that need to be identified as green plants from the multiple frames of video images, and then divides these video images.

[0067] 204. Determine whether the second image block is located in a color gain region according to the blue gain and the red gain of the second image block, and obtain a first determination result.

[0068] After the image processing device divides the video image in the video stream into a plurality of second image blocks, the blue gain and the red gain of the plurality of second image blocks are respectively calculated. According to the blue gain and the red gain of the second image block, it is judged whether the second image block is located in the color gain area, and a first judgment result is obtained. Specifically, according to the blue gain and the red gain of the second image block, it can be judged whether the statistical point corresponding to the second image block on the gain coordinate system (B / GR / G coordinate system) falls in the color gain area (green area). If it falls in the color gain area, it is determined that the second image block is located in the color gain area, and the first judgment result is yes; if it does not fall in the color gain area, it is determined that the second image block is not located in the color gain area, and the first judgment result is no.

[0069] 205. Obtain a second judgment result according to whether the hue value of the second image block is within the first preset range and whether the saturation value of the second image block is within the second preset range.

[0070] The image processing device converts the divided second image block into the HSV color space, and the hue value and saturation value of the second image block in the HSV color space can be obtained. According to the hue value and saturation value of the second image block in the HSV color space, it can be judged whether the hue (H) value of the second image block is within the first preset range and whether the saturation (S) value of the second image block is within the second preset range, and a second judgment result is obtained. If the hue (H) value of the second image block is within the first preset range and the saturation (S) value of the second image block is within the second preset range, the second judgment result is yes; if the hue (H) value of the second image block is not within the first preset range and the saturation (S) value of the second image block is not within the second preset range, the second judgment result is no.

[0071] It can be understood that, according to the value range of the hue (H) value and the saturation (S) value of green in the HSV color space, the first preset range can be the range of [35,77], and the second preset range can be the range of [43,255]. However, in general, the color corresponding to green plants such as trees is not pure green, but generally includes cyan which is close to green. Therefore, the preferred value of the first preset range is the range of [35,99].

[0072] It should be noted that both step 204 and step 205 can be executed, and the order of execution is not limited. Alternatively, only one of the steps can be executed.

[0073] 206. Determine whether the second image block belongs to the image area of ​​green plants according to the first judgment result and / or the second judgment result.

[0074] The image processing device can directly determine whether the second image block belongs to the image area of ​​green plants based on the obtained first judgment result. If the first judgment result is yes, it is determined that the second image block belongs to the image area of ​​green plants; if the first judgment result is no, it is determined that the second image block does not belong to the image area of ​​green plants. The image processing device can also directly determine whether the second image block belongs to the image area of ​​green plants based on the obtained second judgment result.

[0075] Further, the image processing device can determine whether the second image block belongs to the image area of ​​green plants according to the first judgment result and the second judgment result. The image processing device can first perform step 205 to determine that the second judgment result is yes, and then perform step 204 to determine the first judgment result. If the first judgment result is also yes, it is determined that the second image block belongs to the image area of ​​green plants.

[0076] Preferably, the image processing device can first execute step 204 to determine the first judgment result, and make a preliminary judgment on the second image block. If the first judgment result is yes, the set of second image blocks that may belong to the image area of ​​green plants is recorded as the first area, and then the second image block in the first area is executed in step 205 to determine the second judgment result. If the second judgment result is also yes, it is determined that the second image block belongs to the image area of ​​green plants.

[0077] In the embodiment of the present application, the image processing device can effectively determine whether the second image block in the video image belongs to the image area of ​​green plants through the first judgment result and / or the second judgment result, and then locate the green plants in the video image. Further, the green plant area in the outdoor monitoring screen is located, and different encoding parameters are configured for the green plant area and the non-green plant area in the screen in the motion scene, thereby reducing the description of meaningless running information of the green plant area by the encoder, and achieving the purpose of saving bandwidth.

[0078] The above describes the recognition of green plants in the video. Figure 3 , a more detailed description of the identification of green plants in the video is given:

[0079] 301. Obtain a video stream to be identified.

[0080] Step 301 is similar to step 201 and will not be described in detail here.

[0081] 302. Calculate a blue gain and a red gain of each first image block in the green object image.

[0082] The image processing device obtains the first average value of the RGB three-channel components of the pixels in each first image block in the green object image. Specifically, a first image block may contain multiple pixels, and the image processing device may identify each pixel in the image block. The RGB three-channel components of each pixel in the first image block may be obtained by using the halcon program and the halcon built-in image, and then the first average value of the RGB three-channel components of the pixel is calculated. The first average value of the RBG three-channel components includes a red component (R), a blue component (B), and a green component (G).

[0083] The image processing device can calculate the blue gain B / G and the red gain R / G of the first image block according to the first average value of the RBG three-channel component. It can be understood that the first image blocks in the green object image are not the same, so the calculated blue gain B / G and red gain R / G of the first image block are also different.

[0084] 303. Obtain a color gain region obtained by training each first image block in the green object image.

[0085] Step 303 is similar to step 202 and will not be described in detail here.

[0086] 304. Divide the video image that does not contain the preset target object in the video stream into a plurality of second image blocks.

[0087] Certain conditions are required for the image processing device to select the video images of green plants that need to be identified in the video stream to be identified. The embodiment of the present application mainly distinguishes green objects and classifies them into green plants. However, the video stream will contain some video images of preset target objects, which may be green-skinned vehicles or green-clothed pedestrians, etc., but these preset target objects are not what need to be identified in the embodiment of the present application. Therefore, it is necessary to distinguish the video images containing these preset target objects, and determine the video images that do not contain the preset target objects in the video stream as target video images, and these target video images that do not contain green-skinned vehicles or green-clothed pedestrians are the video images that need to be identified in the implementation of the present application.

[0088] The image processing device divides the target video image determined in the video stream into a plurality of second image blocks. This is similar to step 203 and will not be described in detail here.

[0089] 305 . Obtain a first judgment result by judging whether a target gain coordinate point corresponding to the second image block in the gain coordinate system is located in a color gain region.

[0090] The image processing device obtains a second average value of the RGB three-channel components of the pixel points in the second image block, and calculates the blue gain and the red gain of the second image block according to the second average value, which is similar to step 302 and will not be described in detail here.

[0091] The image processing device can determine a target gain coordinate point on the gain coordinate system according to the blue gain and the red gain of the second image block. The horizontal axis and the vertical axis of the gain coordinate system correspond to the horizontal coordinate and the vertical coordinate of the target gain coordinate point, that is, if the horizontal axis of the gain coordinate system is the blue gain and the vertical axis is the red gain, then the horizontal coordinate of the target gain coordinate point is the value corresponding to the blue gain of the second image block, and the vertical coordinate is the value corresponding to the red gain of the second image block. The image processing device can determine whether the target gain coordinate point is located in the color gain area, and then determine whether the second image block is located in the color gain area, and obtain a first judgment result.

[0092] If the target gain coordinate point is located in the color gain region, the first judgment result is yes; if the target gain coordinate point is not located in the color gain region, the first judgment result is no.

[0093] 306. Convert the color-corrected second image block into an HSV color space to obtain a hue value and a saturation value of the second image block.

[0094] When a video surveillance device is collecting images, the color may be distorted; or when multiple video surveillance devices are collecting images of the same target, the color distribution of the collected images is different for some reason. Therefore, the image processing device needs to perform color correction on the second image block according to a preset algorithm. The preset algorithm can be a polynomial regression method, an artificial neural network method, or an SVR method, etc., which is not specifically limited here. Generally, in the RGB space or from the RGB space to the HSV color space, a linear or nonlinear transformation is used to transform and correct the components respectively.

[0095] The image processing device converts the second image block after color correction into the HSV color space to obtain the hue value and saturation value of the second image block in the HSV color space.

[0096] 307 . Obtain a second judgment result according to whether the hue value of the second image block is within the first preset range and whether the saturation value of the second image block is within the second preset range.

[0097] Step 307 is similar to step 205 and will not be described in detail here.

[0098] 308. Determine whether the second image block belongs to the image area of ​​green plants according to the first judgment result and / or the second judgment result.

[0099] Step 308 is similar to step 206 and will not be described in detail here.

[0100] 309. If it is determined that the second image block belongs to the image area of ​​green plants, mark the second image block on the video image and reduce the bit rate of the second image block.

[0101] When the image processing device determines that the second image block belongs to the image area of ​​the green value, the second image block can be marked on the corresponding video image, and the second image block can be faded or highlighted on the corresponding video image, and the specific details are not limited here. The image processing device displays the video image marked with the second image block to show the green plants more intuitively. It can be understood that when there are green plants in the video image, the image processing device can more clearly display the green plants in the video image by determining the second image blocks of the image area belonging to the green plants and marking these second image blocks. It can be understood that the obvious display does not increase the recognition rate of the green plants, but makes the green plants have a sharp contrast with other parts of the video image when displayed, such as making the green plants more blurred than other parts of the video image.

[0102] Furthermore, when the image processing device determines that the second image block belongs to the image area of ​​the green value, the bit rate of the second image block can be reduced. The reduction in bit rate can be to appropriately increase the quantization parameter (QP) value of the second image block or to reduce the resolution of the second image block, which is not limited here. It can be understood that the image processing device can also determine all the second image blocks belonging to green plants in a certain frame of video image, mark these second image blocks as green plant area images, and then reduce the bit rate of the green plant area image to achieve the purpose of saving bandwidth.

[0103] The present application also provides an image processing device, such as Figure 5 As shown, including:

[0104] A first acquisition unit 501 is used to acquire a video stream to be identified, wherein at least one frame of video image in the video stream includes green plants;

[0105] A second acquisition unit 502 is used to acquire a gain coordinate system trained by each first image block in the green object image, wherein two coordinate axes of the gain coordinate system are blue gain and red gain respectively, and the gain coordinate system includes a color gain area, and the color gain area is obtained by the distribution position of each first image block in the gain coordinate system, and the distribution position of the first image block in the gain coordinate system is determined by the red gain value and the blue gain value of the first image block;

[0106] A dividing unit 503, configured to divide the video image in the video stream into a plurality of second image blocks;

[0107] The first execution unit 504 is used to determine whether the second image block is located in the color gain area according to the blue gain and the red gain of the second image block, and obtain a first determination result; and / or, the second execution unit 505 is used to determine whether the hue value is within a first preset range and the saturation value is within a second preset range according to the hue value and the saturation value of the second image block in the HSV color space, and obtain a second determination result;

[0108] The determination unit 506 is configured to determine whether the second image block belongs to the image area of ​​the green plant according to the first determination result and / or the second determination result.

[0109] The present application also provides an image processing device, such as Figure 6 As shown, including:

[0110] CPU 601, memory 602, input / output interface 603, wired or wireless network interface 604 and power supply 605;

[0111] The memory 602 is a temporary storage memory or a permanent storage memory;

[0112] The central processor 601 is configured to communicate with the memory 602 and execute instructions in the memory 602 to perform the above-mentioned identification method.

[0113] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0114] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0115] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0116] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0117] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.

Claims

1. A method for identifying green plants in a video image, characterized in that: include: Acquire a video stream to be identified, wherein at least one frame of video image in the video stream includes green plants; Acquire a gain coordinate system trained by each first image block in a green object image, wherein two coordinate axes of the gain coordinate system are blue gain and red gain respectively, and the gain coordinate system includes a color gain region, and the color gain region is obtained by the distribution position of each first image block in the gain coordinate system, and the distribution position of the first image block in the gain coordinate system is determined by the red gain value and the blue gain value of the first image block; Dividing the video image in the video stream into a plurality of second image blocks; determining whether the second image block is located in the color gain area according to the blue gain and the red gain of the second image block, to obtain a first determination result; and / or, determining, according to the hue value and saturation value of the second image block in the HSV color space, whether the hue value is within a first preset range and whether the saturation value is within a second preset range, to obtain a second determination result; According to the first judgment result and / or the second judgment result, it is determined whether the second image block belongs to the image area of ​​the green plant.

2. The identification method according to claim 1, characterized in that: The dividing the video image in the video stream into a plurality of second image blocks comprises: Determining a video image in the video stream that does not contain a preset target object as a target video image; The target video image in the video stream is divided into a plurality of the second image blocks.

3. The identification method according to claim 1, characterized in that: The method further comprises: If it is determined that the second image block belongs to the image area of ​​the green plant, marking the second image block on the video image; The video image marked with the second image block is displayed.

4. The identification method according to claim 1, characterized in that: The method further comprises: If it is determined that the second image block belongs to the image area of ​​the green plant, the bit rate of the second image block is reduced.

5. The identification method according to claim 1, characterized in that: Before acquiring the gain coordinate system obtained by training each first image block in the green object image, the method further includes: Obtain a first average value of RGB three-channel components of each pixel point in the first image block; A blue gain and a red gain of the first image block are calculated according to the first average value.

6. The identification method according to claim 5, characterized in that: The step of judging whether the second image block is located in the color gain area according to the blue gain and the red gain of the second image block comprises: Obtain a second average value of RGB three-channel components of pixels in the second image block; Calculating a blue gain and a red gain of the second image block according to the second average value; Obtaining a target gain coordinate point on the gain coordinate system according to the blue gain and the red gain of the second image block; It is determined whether the target gain coordinate point is located in the color gain area, and then whether the second image block is located in the color gain area.

7. The identification method according to claim 1, characterized in that: Before determining whether the hue value is within a first preset range and the saturation value is within a second preset range according to the hue value and saturation value of the second image block in the HSV color space, the method further includes: Performing color correction on the second image block according to a preset algorithm; The color-corrected second image block is converted into the HSV color space to obtain the hue value and saturation value of the second image block in the HSV color space.

8. An image processing device, characterized in that: include: A first acquisition unit is used to acquire a video stream to be identified, wherein at least one frame of video image in the video stream includes green plants; a second acquisition unit, configured to acquire a gain coordinate system obtained by training each first image block in a green object image, wherein two coordinate axes of the gain coordinate system are blue gain and red gain respectively, and the gain coordinate system includes a color gain region, and the color gain region is obtained by a distribution position of each first image block in the gain coordinate system, and the distribution position of the first image block in the gain coordinate system is determined by a red gain value and a blue gain value of the first image block; A dividing unit, configured to divide the video image in the video stream into a plurality of second image blocks; a first execution unit, configured to determine whether the second image block is located in the color gain region according to the blue gain and the red gain of the second image block, to obtain a first determination result; and / or a second execution unit, configured to determine whether the hue value is within a first preset range and the saturation value is within a second preset range according to the hue value and the saturation value of the second image block in the HSV color space, to obtain a second determination result; A determination unit is used to determine whether the second image block belongs to the image area of ​​the green plant according to the first judgment result and / or the second judgment result.

9. An image processing device, characterized in that: include: CPU, memory, input and output interfaces, wired or wireless network interfaces, and power supply; The memory is a short-term storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory to perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises instructions, and when the instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 7.