gabrielburnworth / plant-detection Goto Github PK
View Code? Open in Web Editor NEWDetects and marks plants in a soil area image using Python OpenCV
Detects and marks plants in a soil area image using Python OpenCV
Conversion from pixel locations to machine coordinates has been implemented.
detect_plants("soil_image.jpg", blur=15, morph=6, iterations=4,
calibration_img="pixel_to_coordinate/p2c_test_calibration.jpg",
known_plants=[[800, 200, 100], [1130, 600, 120]])
Example output shown below used a rotated calibration image.
Green = known plant
Blue = saved plant
Red = plant marked for removal
Processing image: soil_image.jpg
14 plants detected in image.
Detected object machine coordinates ( X Y ) with R = radius:
( 1224 115 ) R = 28
( 677 126 ) R = 33
( 826 147 ) R = 28
( 1077 220 ) R = 21
( 870 238 ) R = 23
( 1132 280 ) R = 24
( 1178 317 ) R = 5
( 950 438 ) R = 27
( 1291 473 ) R = 31
( 777 507 ) R = 31
( 420 552 ) R = 32
( 1140 602 ) R = 53
( 303 644 ) R = 23
( 309 843 ) R = 32
2 known plants inputted.
Plants at the following machine coordinates ( X Y ) with R = radius are to be saved:
( 800 200 ) R = 100
( 1130 600 ) R = 120
11 plants marked for removal.
Plants at the following machine coordinates ( X Y ) with R = radius are to be removed:
( 1224 115 ) R = 49
( 677 126 ) R = 57
( 1077 220 ) R = 35
( 1132 280 ) R = 41
( 1178 317 ) R = 8
( 950 438 ) R = 47
( 1291 473 ) R = 54
( 777 507 ) R = 53
( 420 552 ) R = 55
( 303 644 ) R = 39
( 309 843 ) R = 55
3 detected plants are known or have escaped removal.
Plants at the following machine coordinates ( X Y ) with R = radius have been saved:
( 826 147 ) R = 47
( 870 238 ) R = 39
( 1140 602 ) R = 92
I need to identify the proportion of plants in the picture,What do I need to do?
The detect_weeds
function to process an image uses a default or selected morph amount. This value usually needs to be optimized for each image to:
Sometimes there is not an optimum solution using the current approach of a closing morphology (as described here).
I have a problem with module. First I have no error however now I have module error. How can I fix this?
ModuleNotFoundError: No module named 'plant_detection'
See What's a weed? wiki page for explanation and example.
This issue in FarmBot Forum describes the problem(s).
Here's a screenshot of the Raspberry Pi Serial Console when I try CALIBRATE
in the WebApp Farmware Camera Calibration ( I'm running FarmbotOS v8.2.4-rc1
on Raspberry Pi 3 Model B Plus with USB Camera
[ 6.454538] uvcvideo: Found UVC 1.00 device C922 Pro Stream Webcam (046d:085c)
which captures stills nicely using take-photo
:-)
Thanks
I tried changing morph_amount
from the default of 5
to some extremes: 1
, 10
, 100
, and 1,000
. There were no apparent changes in the output images.
Then I changed this line: kernel = np.ones((morph_amount, morph_amount), np.uint8)
To: kernel = np.ones((1000, 1000), np.uint8)
and that took effect.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.