Ask Your Question
0

Access Image pixels' value OpenCV, C++

asked 2016-04-16 19:54:01 -0600

Paul2208 gravatar image

Hello all,

I am trying to access color image pixels' values an somehow process them. Here is what I am trying to do:

  1. I have two color images I1 & I2 (same size images).
  2. I would like to compare all their pixels: compare I1(i,j) with I2(i,j).
  3. if I1(i,j) > I2(i,j) , copy I1(i,j) to a new image I3(i,j)
  4. else copy I2(i,j) to I3(i,j)
  5. at the end return the color image I3

I am using opencv3.1 and visual studio 2015.

Thanks in advance.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-04-16 20:39:41 -0600

Tetragramm gravatar image

You're looking for the max() function.

Try familarizing yourself with the documentation and basic functions of OpenCV.

edit flag offensive delete link more

Comments

It is exactly what I was looking for. Thanks.

Paul2208 gravatar imagePaul2208 ( 2016-04-16 21:15:09 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-04-16 19:54:01 -0600

Seen: 247 times

Last updated: Apr 16 '16