libyuv::I420ToARGB(buffer->DataY(), buffer->StrideY(),
buffer->DataU(), buffer->StrideU(),
buffer->DataV(), buffer->StrideV(),
image_.get(),
buffer->width() *
32 / 8,
buffer->width(), buffer->height());
QImage Ultrasonic(image_.get(), buffer->width(), buffer->height(), QImage::Format_RGB32);
cv::Mat myuv(Ultrasonic.height(), Ultrasonic.width(), CV_8UC4, (void*)Ultrasonic.constBits(), Ultrasonic.bytesPerLine());
cv::blur(myuv, myuv, cv::Size(15,15), cv::Point(-1, -1));
//cv::GaussianBlur(myuv, myuv, cv::Size(15, 15), 1.5, 1.5);
QImage image((const unsigned char *)(myuv.data), myuv.cols, myuv.rows, myuv.cols * 4, QImage::Format_RGB32);
libyuv::I420ToRGB24(buffer.DataY(), buffer.StrideY(),
buffer.DataU(), buffer.StrideU(),
buffer.DataV(), buffer.StrideV(),
UltrasonicImage_.get(),
buffer.width() *
24 / 8,
buffer.width(), buffer.height());
QImage Ultrasonic(UltrasonicImage_.get(), buffer.width(), buffer.height(), QImage::Format_RGB888);
cv::Mat myuv(Ultrasonic.height(), Ultrasonic.width(), CV_8UC3, (void*)Ultrasonic.constBits(), Ultrasonic.bytesPerLine());
QImage image((const unsigned char *)(myuv.data), myuv.cols, myuv.rows, myuv.cols * 3, QImage::Format_RGB888);