adding image pixel values - canny to original - image processing

defunktlemon

Member
Joined
Jan 24, 2013
Messages
6
Location
Reading, England
Programming Experience
Beginner
Hi.
I'm trying to learn c# by experimenting with image processing techniques.
My first is image addition using the original image with pixel values added from the same image but after the canny edge filter was applied. I would then like to click a button on the form and have a new image displayed in a third picture box which has the images added together. This should show the outline of the original image in better detail afterwards.

I have attached an image of the form I have prepared with the original and canny .gif images and a third blank box.

add1.jpg

I think there is also something I need to do so that the values don't overrun, but i'll research that in the meantime and add it in later once the pixel values have been added for all pixels.

Thanks
 

defunktlemon

Member
Joined
Jan 24, 2013
Messages
6
Location
Reading, England
Programming Experience
Beginner
I have the information about the overrun problem I found on the site I'm using for this study.

Ref: Image Arithmetic - Pixel Addition

If the image format being used only supports, say 8-bit integer pixel values, then it is very easy for the result of the addition to be greater than the maximum allowed pixel value. The effect of this depends upon the particular implementation. The overflowing pixel values might just be set to the maximum allowed value, an effect known as saturation. Alternatively the pixel values might wrap around from zero again. If the image format supports pixel values with a much larger range, e.g. 32-bit integers or floating point numbers, then this problem does not occur so much.

I think there may be two ways to go about this, one using loops and get / set, and the other using LockBits.
 
Top Bottom