How to extract (R,G,B) value from an image?

218 views
Skip to first unread message

Hussain

unread,
Aug 17, 2016, 2:44:41 AM8/17/16
to MIT App Inventor Forum
Sir, I need to extract the (R,G,B) components from the center of the image attached here and show the R, G and B value on the screen. Is this possible with app inventor?? If possible please give me the process flow how to do it.. 
IMG_5699.MOV_20151015_121811.976.jpg

ScottFerguson

unread,
Aug 17, 2016, 8:00:34 AM8/17/16
to mitappinv...@googlegroups.com

You would likely need the canvas GetBackgroundPixelColor block for this to get the MITAI color value.

Then you would use the color SplitColor block to get the RGB values into a list.

Here is an example app:



note: the last set of blocks gets the Green value, not the Blue value as indicated in the comment :(




RGB.aia

Abraham Getzler

unread,
Aug 17, 2016, 12:15:32 PM8/17/16
to MIT App Inventor Forum
(Added to my FAQ)
ABG

Reply all
Reply to author
Forward
0 new messages