Demo entry 6782524

1

   

Submitted by anonymous on Jan 18, 2019 at 07:35
Language: C++. Code size: 774 Bytes.

black_img = Mat::zeros(Vpixel, Vpixel, CV_8UC3);

		Mat temp_roi(virtual_img, Rect(x_roi, y_roi, int(w_roi), int(h_roi))); // cut the part of virtual image 
		Mat black_roi(black_img, Rect(x_black, y_black, temp_roi.cols, temp_roi.rows)); // set the location to add
		addWeighted(black_roi, 1.0, temp_roi, 1.0, 0, black_roi); // add a part image to black image

		Mat resized_black_image;
		resize(black_img, resized_black_image, Size(int(Dpixel_lens), int(Dpixel_lens)), 0, 0);
		Mat image_roi(device_display, Rect((*d_iter).first - 1, (*d_iter).second - 1, resized_black_image.cols, resized_black_image.rows)); // resized black img 삽입할 영역설정
		addWeighted(image_roi, 1.0, resized_black_image, 1.0, 0, image_roi); // Integrate resized black image into set loacation

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).