int main(int argc, char** argv){
cv::Mat gray;
cv::Mat resize;
cv::Mat big;
cv::cvtColor(src, gray, CV_BGR2GRAY);
cv::resize(gray, resize, cv::Size(src.rows/2, src.cols/2));
cv::resize(resize, big, cv::Size(src.rows, src.cols));
cv::Mat clone(resize.rows, resize.cols, CV_8U);
for(int y=0;y<resize.rows;y++){
for(int x=0;x<resize.cols;x++){
clone.at<uchar>(y,x) = resize.at<uchar>(y,x);
}
}
cv::imshow("clone", clone);
I wrote my code and I have 2 questions
1) How can I enlarge 1 pixel into 4 pixels? and also show them.
2) How can I enlarge every pixels of image into 4 multiply with every pixels of image? (Not to use interpolation)
Edit
from my image I want to enlarge 1 pixel into 4 pixel.
Then all of pixels image must englarged into bigger image.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…