i want to know how to make a loop to count image pixel start counting pixels from the left edge of the image
how to make this using c++ opencv
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you don’t need to build the loop yourself, it is all already done for you.
The first line loads your image into the standard C++ OpenCV container
Mat.The second line prints the number of elements in the underlaying array of the
Mat, in case of an image, this is equal to the total number of pixels of that image.If those constructs were new to you, you should start with reading these tutorials.