Home > Back-end >  C opencv use vs2017 C2106 mistakes, but grammar mistakes
C opencv use vs2017 C2106 mistakes, but grammar mistakes

Time:03-03

Are learning OpenCV, using c + + language, development environment is vs2017, here are always quote C2106 error condition judgment, said "=" left operand must be left value, but in my judgment is obviously "==", really feel suspicious, please the great god to the younger brother off, thank you very much, here is the source code and error code screenshots,

# include
# include
# include
# include
using namespace std;
Using the namespace CV;
Int main ()
{
Mat src1, src2, DST;
Src1=imread (" E:/Project/C_OPV/beauty. JPG ");
Src2=imread (" E:/Project/C_OPV/beauty. JPG ");
Int val=src1. Rows;
Cout & lt; <"The beauty:" & lt; Cout & lt; <"Beauty:" & lt;
If (src1. Rows==src2. Rows & amp; & Src1. Cols==src2. Cols & amp; & Src1. Type ()=src2. Type ())
{
Cout & lt; <"Image size and same type" & lt; }
return 0;
}

CodePudding user response:

The compiler said you have a wrong you must be a wrong
The compiler doesn't necessarily true didn't say you are wrong you

And error messages have been positioning to the equal sign, less clearly is trying to tell you an equal sign,

CodePudding user response:

the last little==
 if (src1. Rows==src2. Rows & amp; & Src1. Cols==src2. Cols & amp; & Src1. Type ()==src2. Type ()) 

CodePudding user response:

Hair done, the clothes are fixed, but the shoes are not produced,

CodePudding user response:

The last to have written the===
  • Related