Ask Your Question
0

how to perform arithmatic operation like addition on each pixel in the row and column in image

asked 2012-12-29 21:30:09 -0600

sg gravatar image

i want to implement wavelet transform on image using the pixel operation without any library. for that for that i want to perform the addition and subtraction operation on the each pixel of the row and the column of the image... Any ideas?! Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2012-12-30 01:02:38 -0600

Michael Burdinov gravatar image

You can perform arithmetic operations on image in the most straightforward way. Here some examples:

Mat yourImage;
....                         // set values in your image
yourImage += 2;              // add 2 to each pixel in image
yourImage.col(3) *= 1.5;     // multiply each value in column 3 by 1.5
yourImage.row(5) = 7*yourImage.row(4) - 8*yourImage.row(3) - 1; // you can guess what it does :)

And so on.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-12-29 21:30:09 -0600

Seen: 143 times

Last updated: Dec 30 '12