-
Notifications
You must be signed in to change notification settings - Fork 1
2.Young Lettuce Detection
The underlying principle for this detection algorithm is to produce two masks. One capturing everything green and another capturing only the crop. To get a final output the crop mask is subtracted from mask capturing all green areas.

This feature is contained in a "weed_detection" node, which is contained in "weedDetection.py" script in package ROS. NOTICE: it will be run only when this specific camera mode is chosen, and only on the capture of a new frame.
/thorvald_001/kinect2_camera/hd/image_color_rect - topic to get a picture from a camera from
/camera_mode - the topic which features information from a path controller and determines which detection algorithm will be used.
NONE - it passes a mask of where it believes to see weeds to single map generation feature inside the same node.
Detection starts with bluring the image with 5x5 kernel and changing the input picture to hsv color space. Then two masks are computed: one for all plants on the screen and the other only for the crop. H and S channels are used for it. Nxt the cabbage mask is dilated to form some safe space for the crops. Then masks are combined with bitwise operation to form a mask showing weeds only. This is then eroded and diluted to get rid of noise.
There are two ways to run this node. One is to use a "FullLaunch.launch" file in package "ROS", which starts the whole system. Otherwise, "BasicLaunch.launch" can be used and the "weed_detection" node by running a "weedDetection.py" script from package "myOpenCV"
Some blobs are not detected