Ask Your Question

Revision history [back]

When i open a image, why does it has a border?

source image

QString fileName = QFileDialog::getOpenFileName(this,
                                                tr("Open Image"),".",
                                                tr("Image Files(*.png *.jpg *.jpeg *.bmp)"));
image = cv::imread(fileName.toUtf8().data());
    qDebug()<< "Could not open or find the image";
    return ;
QString status = QString::number(image.rows) + "x" + QString::number(image.cols);
cv::namedWindow("Original Image");
cv::imshow("Original Image",image);

``` result image

I can't understand this situration,Where is the problem?