+ 1
How to know colour of each pixel in colour code format and want to store this colour code format in a text format
I want to make a column and row of colour code of an camera image
1 ответ
+ 5
Hi Ram, Do you want to extract the RGB color information of every pixel ? Are you using opencv libraries? If yes, then refer below code.
Mat m= imread("image.jpg");
for(int i=0; i<m.row;i++){
for (int j=0; j<m.col; j++){
std::cout <<" Pixel Position: "<< i<< j<<endl;
m(i,j) << Std: endl;
}
}
let me know, in case of any problem.