Groups
Conversations
All groups and messages
Send feedback to Google
Help
Training
Sign in
Groups
OpenCV with Python Blueprints
Conversations
About
Query on NDVI image
23 views
Skip to first unread message
Aman Dalmia
unread,
Jan 19, 2017, 2:07:37 AM
1/19/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OpenCV with Python Blueprints
Hi All,
I have an ndvi image, let say
http://www.sunrise21.org.au/userfiles/ndvi.jpg
I need to make a border around the dense red area. How can I do this.
Thanks,
-Aman
Michael Beyeler
unread,
Jan 19, 2017, 3:04:44 PM
1/19/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OpenCV with Python Blueprints
Hi Aman,
Here's a possible outline:
Convert to
HSV
.
Find the distribution (range) of HSV values of pixels in the red zone.
Use this range to make a mask that only contains the red pixels (using
inRange
).
Find the
contours
of all red blobs.
For each contour, find the outermost pixels (x_min, x_max, y_min, y_max). Use as boundaries for rectangles.
Draw a
rectangle
in the original image.
Best,
Michael
Reply all
Reply to author
Forward
0 new messages