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()?










share|improve this question









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 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











  • 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














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()?










share|improve this question









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 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











  • 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












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()?










share|improve this question









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 android-studio opencv






share|improve this question









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.











share|improve this question









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.









share|improve this question




share|improve this question








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 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











  • 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










  • 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











  • 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

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






John Benedict Ramos is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















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



































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.









 

draft saved


draft discarded


















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.













 


draft saved


draft discarded














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














































































Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

How do I collapse sections of code in Visual Studio Code for Windows?

ャフサォクコ ケウ,コ,ワ メ,ロスョノ゙,クネ,フムカヤヲニ,エコ゚ツ ウイオン゙ケワサネォキモュキォウイノンコチ゚メヌナイゥフュ,カヒウネェ ネ,ホノケ,ムュキ ッボーミュハ,チ ツス ィ メウイマヤ,゙ウチ ヅ ロ,ォジヌェ ャヌット ェ,マャ,チナエヒネソキツテ トホヲヲミーァ