Skip to content

How to get color value from color frame at a point position #13144

Closed Answered by obypix
obypix asked this question in Q&A
Discussion options

You must be logged in to vote

and another oops, I forgot to multiply the ix and iy offsets by 3
so this works and gets the right color values:

                    uint8_t r = vf_data_us[iy * color_width * 3 + ix*3 + 0];
                    uint8_t g = vf_data_us[iy * color_width * 3 + ix*3 + 1];
                    uint8_t b = vf_data_us[iy * color_width * 3 + ix*3 + 2];

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by obypix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant