Ask Your Question

Revision history [back]

How to create a mat range like MATLAB matrix

I'm very new to OpenCV C++(started using it two days ago), I want to create a manual matrix in opencv like this matlab code! can anyone help me?

for i=5:imCopyW-5
for j= 15:imCopyH-10
tmpSum = sum(edgeImg(j-10 : j+10, i));
if (tmpSum>=20)
VotingMap(j-10 : j+10, i-5 : i+5) = 0;
outlierBinary(j-10 : j+10, i-5 : i+5) = 0;

Thanks.

How to create a mat range like MATLAB matrix

I'm very new to OpenCV C++(started using it two days ago), I want to create a manual matrix in opencv like this matlab code! can anyone help me?

for i=5:imCopyW-5 
for j= 15:imCopyH-10
tmpSum = sum(edgeImg(j-10 : j+10, i));
if (tmpSum>=20)
VotingMap(j-10 : j+10, i-5 : i+5) = 0;
outlierBinary(j-10 : j+10, i-5 : i+5) = 0;

0;

Thanks.