How can I preview full Screen in OpenCv JavaCameraView

asked 2019-02-20 05:27:18 -0500

updated 2019-02-20 05:28:01 -0500

berak gravatar image

I have tried to implement JavaCameraView in android but I am facing one issue like I am not able to show camera in full screen. It is showing in 480(width)x720(height) by default. How can show preview in full screen like system Camera App.

edit retag flag offensive close merge delete


This is python code. But you will have to convert to java.

import cv2
filename = 'opencv.jpg'
W = 1200
oriimg = cv2.imread(filename)
height, width, depth = oriimg.shape
imgScale = W / width
newX, newY = oriimg.shape[1] * imgScale, oriimg.shape[0] * imgScale
newimg = cv2.resize(oriimg, (int(newX), int(newY)))
cv2.imshow("Show by CV2", newimg)
supra56 gravatar imagesupra56 ( 2019-02-20 08:39:32 -0500 )edit