Color Detection in Android Studio OpenCV
up vote
1
down vote
favorite
I am currently trying to make an application in Android that will detect this colors.
Left circle with RGB Values of (167,103,103). Middle Circle: (163,98,94). Right Circle: (134,62,66)

What I've done is convert the image into HSV then use
Core.inRange(HSV, new Scalar(0,0,0),new Scalar(0,0,0),ColorDetection );
How can i detect left circle, middle circle and the right circle and eventually all of them? What values should i put inside Scalar()?
java
New contributor
John Benedict Ramos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
1
down vote
favorite
I am currently trying to make an application in Android that will detect this colors.
Left circle with RGB Values of (167,103,103). Middle Circle: (163,98,94). Right Circle: (134,62,66)

What I've done is convert the image into HSV then use
Core.inRange(HSV, new Scalar(0,0,0),new Scalar(0,0,0),ColorDetection );
How can i detect left circle, middle circle and the right circle and eventually all of them? What values should i put inside Scalar()?
java
New contributor
John Benedict Ramos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Possible duplicate: stackoverflow.com/questions/50449602/… Also, this link might be helpful
– Rick M.
Nov 8 at 12:13
oh, so I need to convert the RGB Values to HSV Values. i found this link link Can I use this for checking. Also I've found out thatCore.inRangehas a lower bound and upper bound. (i don't know what to call it sorry just started) so in the "upper bound" should i put the HSV values of the right circle?
– John Benedict Ramos
Nov 8 at 12:52
Yes, if you are using theinRangefunction on HSV image, you should use HSV values. Also, the link provides RGB and HSV conversion values but not in the opencv range. The opencv range is different as you can see in the link I attached above
– Rick M.
Nov 8 at 13:19
Thanks! The left circle is now detecting!
– John Benedict Ramos
Nov 8 at 13:51
Possible duplicate of How to define a threshold value to detect only green colour objects in an image :Opencv
– Silencer
Nov 9 at 0:41
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am currently trying to make an application in Android that will detect this colors.
Left circle with RGB Values of (167,103,103). Middle Circle: (163,98,94). Right Circle: (134,62,66)

What I've done is convert the image into HSV then use
Core.inRange(HSV, new Scalar(0,0,0),new Scalar(0,0,0),ColorDetection );
How can i detect left circle, middle circle and the right circle and eventually all of them? What values should i put inside Scalar()?
java
New contributor
John Benedict Ramos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I am currently trying to make an application in Android that will detect this colors.
Left circle with RGB Values of (167,103,103). Middle Circle: (163,98,94). Right Circle: (134,62,66)

What I've done is convert the image into HSV then use
Core.inRange(HSV, new Scalar(0,0,0),new Scalar(0,0,0),ColorDetection );
How can i detect left circle, middle circle and the right circle and eventually all of them? What values should i put inside Scalar()?
java
java
New contributor
John Benedict Ramos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
John Benedict Ramos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited Nov 8 at 12:53
DaFois
1,65831418
1,65831418
New contributor
John Benedict Ramos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked Nov 8 at 12:10
John Benedict Ramos
62
62
New contributor
John Benedict Ramos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
John Benedict Ramos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
John Benedict Ramos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Possible duplicate: stackoverflow.com/questions/50449602/… Also, this link might be helpful
– Rick M.
Nov 8 at 12:13
oh, so I need to convert the RGB Values to HSV Values. i found this link link Can I use this for checking. Also I've found out thatCore.inRangehas a lower bound and upper bound. (i don't know what to call it sorry just started) so in the "upper bound" should i put the HSV values of the right circle?
– John Benedict Ramos
Nov 8 at 12:52
Yes, if you are using theinRangefunction on HSV image, you should use HSV values. Also, the link provides RGB and HSV conversion values but not in the opencv range. The opencv range is different as you can see in the link I attached above
– Rick M.
Nov 8 at 13:19
Thanks! The left circle is now detecting!
– John Benedict Ramos
Nov 8 at 13:51
Possible duplicate of How to define a threshold value to detect only green colour objects in an image :Opencv
– Silencer
Nov 9 at 0:41
add a comment |
Possible duplicate: stackoverflow.com/questions/50449602/… Also, this link might be helpful
– Rick M.
Nov 8 at 12:13
oh, so I need to convert the RGB Values to HSV Values. i found this link link Can I use this for checking. Also I've found out thatCore.inRangehas a lower bound and upper bound. (i don't know what to call it sorry just started) so in the "upper bound" should i put the HSV values of the right circle?
– John Benedict Ramos
Nov 8 at 12:52
Yes, if you are using theinRangefunction on HSV image, you should use HSV values. Also, the link provides RGB and HSV conversion values but not in the opencv range. The opencv range is different as you can see in the link I attached above
– Rick M.
Nov 8 at 13:19
Thanks! The left circle is now detecting!
– John Benedict Ramos
Nov 8 at 13:51
Possible duplicate of How to define a threshold value to detect only green colour objects in an image :Opencv
– Silencer
Nov 9 at 0:41
Possible duplicate: stackoverflow.com/questions/50449602/… Also, this link might be helpful
– Rick M.
Nov 8 at 12:13
Possible duplicate: stackoverflow.com/questions/50449602/… Also, this link might be helpful
– Rick M.
Nov 8 at 12:13
oh, so I need to convert the RGB Values to HSV Values. i found this link link Can I use this for checking. Also I've found out that
Core.inRange has a lower bound and upper bound. (i don't know what to call it sorry just started) so in the "upper bound" should i put the HSV values of the right circle?– John Benedict Ramos
Nov 8 at 12:52
oh, so I need to convert the RGB Values to HSV Values. i found this link link Can I use this for checking. Also I've found out that
Core.inRange has a lower bound and upper bound. (i don't know what to call it sorry just started) so in the "upper bound" should i put the HSV values of the right circle?– John Benedict Ramos
Nov 8 at 12:52
Yes, if you are using the
inRange function on HSV image, you should use HSV values. Also, the link provides RGB and HSV conversion values but not in the opencv range. The opencv range is different as you can see in the link I attached above– Rick M.
Nov 8 at 13:19
Yes, if you are using the
inRange function on HSV image, you should use HSV values. Also, the link provides RGB and HSV conversion values but not in the opencv range. The opencv range is different as you can see in the link I attached above– Rick M.
Nov 8 at 13:19
Thanks! The left circle is now detecting!
– John Benedict Ramos
Nov 8 at 13:51
Thanks! The left circle is now detecting!
– John Benedict Ramos
Nov 8 at 13:51
Possible duplicate of How to define a threshold value to detect only green colour objects in an image :Opencv
– Silencer
Nov 9 at 0:41
Possible duplicate of How to define a threshold value to detect only green colour objects in an image :Opencv
– Silencer
Nov 9 at 0:41
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
John Benedict Ramos is a new contributor. Be nice, and check out our Code of Conduct.
John Benedict Ramos is a new contributor. Be nice, and check out our Code of Conduct.
John Benedict Ramos is a new contributor. Be nice, and check out our Code of Conduct.
John Benedict Ramos is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53207480%2fcolor-detection-in-android-studio-opencv%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Possible duplicate: stackoverflow.com/questions/50449602/… Also, this link might be helpful
– Rick M.
Nov 8 at 12:13
oh, so I need to convert the RGB Values to HSV Values. i found this link link Can I use this for checking. Also I've found out that
Core.inRangehas a lower bound and upper bound. (i don't know what to call it sorry just started) so in the "upper bound" should i put the HSV values of the right circle?– John Benedict Ramos
Nov 8 at 12:52
Yes, if you are using the
inRangefunction on HSV image, you should use HSV values. Also, the link provides RGB and HSV conversion values but not in the opencv range. The opencv range is different as you can see in the link I attached above– Rick M.
Nov 8 at 13:19
Thanks! The left circle is now detecting!
– John Benedict Ramos
Nov 8 at 13:51
Possible duplicate of How to define a threshold value to detect only green colour objects in an image :Opencv
– Silencer
Nov 9 at 0:41