Reputation: 167
In particular, I have 2 vectors that have been filled by integers between 0 and 255 and a gray scale image. I want to change the gray level of pixels of the image that matches with vec1[i] to vec2[i].
Do you know any function or fast procedure that can perform this in OpenCV?
I couldnt find a built-in function that returns all pixels with a specified gray level in OpenCV.
Best Ali
Upvotes: 1
Views: 1173
Reputation: 17169
That is known as a lookup-table transform, and that exists in opencv (link to documentation). You will have to adapt your input format a bit though .
Upvotes: 2