1 | initial version |
The following code works:
cv::Mat B = cv::Mat::ones(300,300,CV_32FC1);
for (int i = 0; i < 100; i++)
{
B.at<int>(50, i) = 0;
B.at<int>(51, i) = 0;
}
cv::Mat res_B;
resize(B, res_B, Size(423, 330));
namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
imshow( "Display Image", B );
imshow( "Display Resized Image", res_B );
waitKey(0);
2 | No.2 Revision |
The following code works:
cv::Mat B = cv::Mat::ones(300,300,CV_32FC1);
for (int i = 0; i < 100; i++)
{
B.at<int>(50, i) = 0;
B.at<int>(51, i) = 0;
}
cv::Mat res_B;
resize(B, res_B, Size(423, 330));
Size(640, 480));
namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
imshow( "Display Image", B );
imshow( "Display Resized Image", res_B );
waitKey(0);
3 | No.3 Revision |
The following code works:
cv::Mat B = cv::Mat::ones(300,300,CV_32FC1);
for (int i = 0; i < 100; i++)
{
B.at<int>(50, i) = 0;
B.at<int>(51, i) = 0;
}
cv::Mat res_B;
resize(B, res_B, Size(640, 480));
namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
imshow( "Display Image", B );
imshow( "Display Resized Image", res_B );
waitKey(0);
I hope it will help.