Direction of triangle [closed]

asked 2019-04-22 23:40:53 -0600

Nuser gravatar image

updated 2020-10-04 13:11:01 -0600

Hello, I have 4 types of triangle and I want to classify triangles by their directions: upward, downward, right, left. How can I solve this with image processing?

image description

image description

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Nuser
close date 2019-04-23 05:27:58.124329

Comments

try to use approxPolyDP to get the three vertex

LBerger gravatar imageLBerger ( 2019-04-23 02:00:38 -0600 )edit

no way, algorithm says those are rectangle, even tried blurring :(

Nuser gravatar imageNuser ( 2019-04-23 02:52:37 -0600 )edit
1

show us your code

LBerger gravatar imageLBerger ( 2019-04-23 03:16:24 -0600 )edit

okey, I fixed, now says they are triangle all. after this point?, directions :)

Nuser gravatar imageNuser ( 2019-04-23 03:50:13 -0600 )edit
2

It's a joke! you can detect triangle and you don't know how to define upward, downward, right, left?

LBerger gravatar imageLBerger ( 2019-04-23 03:59:36 -0600 )edit

with math, yes. but is there easier way/algorithm built-in? :D

Nuser gravatar imageNuser ( 2019-04-23 04:01:16 -0600 )edit