Visual Studio Code - Python Install

 

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
Unfortunately Qt creator in linux does not support BGR888 format, so we have to convert the image to RGB format by using cvtColor funtion before displaying it.
Mat img = imread("lena.jpg");
cvtColor(img, img, COLOR_BGR2RGB);
auto w = ui->label->width();
auto h = ui->label->height();
ui->label->setPixmap(
 QPixmap::fromImage(
 QImage(img.data, img.cols, img.rows, img.step, QImage::Format_RGB888)
 ).scaled(w, h, Qt::KeepAspectRatio)

);

me1237guy 發表在 痞客邦 留言(0) 人氣()

image

INCLUDEPATH += /usr/local/include/opencv4/
LIBS+= -L/usr/local/lib/ \
`pkg-config --cflags --libs opencv4`

me1237guy 發表在 痞客邦 留言(0) 人氣()

1
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。