Ask Your Question

FreeApe's profile - activity

2015-12-24 04:45:16 -0600 commented question When i open a image, why does it has a border?

...The channels is related to the second pram of imread() function

2015-12-24 01:39:52 -0600 commented question When i open a image, why does it has a border?

THanks.^_^ How to judge whether the image has an alpha channel?

2015-12-24 00:55:10 -0600 commented question When i open a image, why does it has a border?

@berak,and the value of IMERAD_ANYCOLOR can't be find ,though i konw the value is 4

2015-12-24 00:54:01 -0600 commented question When i open a image, why does it has a border?

I tested that your said,but the result is the same

2015-12-24 00:02:30 -0600 asked a question 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());
if(!image.data){
    qDebug()<< "Could not open or find the image";
    return ;
}
QString status = QString::number(image.rows) + "x" + QString::number(image.cols);
ui->label_2->setText(status);
//show 
cv::namedWindow("Original Image");
cv::imshow("Original Image",image);

``` result image

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