Change pixel value (PutPixel)

Change pixel value (PutPixel)


What is the easiest way to set a pixel value in a 8u_C1 image? I have a loop that needs to set pixels to a value as it goes.

IPL had a PutPixel, but IPP has nothing of that kind.

Thanks in advanced.


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


in IPP it is very easy because you have direct access to image data. So all you need is to calculate pixel address, for 8u_C1 images it is something like this:

let i - is column #
and j is row #

pixel_value = pSrc[ j*imageStep + i ];


Leave a Comment

Please sign in to add a comment. Not a member? Join today