Ask Your Question
0

Is cv::add() missing argument to pass mask?

asked 2013-04-24 01:54:57 -0600

Booker gravatar image

updated 2013-04-30 05:43:44 -0600

I can only call cv::add(src1, src2, dst)

Is it a bug?

ps: my case image description

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-04-24 05:45:20 -0600

updated 2013-04-24 05:47:05 -0600

As seen here you can call the function with a mask. Be sure that the mask only contains 0 and 1 values and is thus a binary image.

So your code should look like

cv::add(src1, src2, dst, mask);

If your openCV does not accept this, then please download the latest version. This does support the function.

EDIT: I have tested it inside my VS2012 which links to the OpenCV2.4.5 and the argument list is supported as seen in the figure below.

image description

edit flag offensive delete link more

Comments

I cannot call it in XCode though, I can only call the add from mat.hpp instead of core.hpp

Booker gravatar imageBooker ( 2013-04-30 00:09:57 -0600 )edit

XCode is using the C++ libraries right? Then this should work. What openCV version are you using? Did you download it from main download page?

StevenPuttemans gravatar imageStevenPuttemans ( 2013-04-30 01:39:01 -0600 )edit

I'm using 2.4.5 from the main download page. It should be C++ libraries but I just cannot call the add function from core.hpp.

When I type cv::add, there is only one option that asks for 3 arguments.

I have added the screen captured, please help.

Booker gravatar imageBooker ( 2013-04-30 05:40:22 -0600 )edit

Please file a bug report for this one. I am getting more and more the impression this is actually a bug.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-04-30 07:56:03 -0600 )edit

The iOS admin just closed my report(#2999) saying it is XCode feature, not a bug. I still have no clue to pass a mask.....sigh

Booker gravatar imageBooker ( 2013-05-03 13:45:00 -0600 )edit

Then ask the same person for directions... i cannot help you more on this topic :)

StevenPuttemans gravatar imageStevenPuttemans ( 2013-05-04 04:50:09 -0600 )edit

Thanks for your replies, I have been waiting for him to reply for several days.

Booker gravatar imageBooker ( 2013-05-04 10:01:50 -0600 )edit

Question Tools

Stats

Asked: 2013-04-24 01:54:57 -0600

Seen: 430 times

Last updated: Apr 30 '13