cdle-traininglabs
cdle-traininglabs copied to clipboard
FaceAnonymizationWebCam Issue on Mac
Mac Java java version "1.8.0_221"
https://gist.github.com/codenamewei/fa73de5eefc377dfe498d950496348b4
@kenghooi-teoh
https://gist.github.com/khalidmjii/ec64a7a32fa72dbd967d9b0e31def0d0
I abled to reproduce two problems with different JDK 8 patches
@choowilson @kenghooi-teoh Yet not able to find the solutions as of now.
Not sure how to debug the unknown exception, but here's a workaround:
Instead of using .imshow, we can use the following code,
// Before while loop in in FaceRecognitionWebcam.java
// Create image window named "My Image".
final CanvasFrame canvas = new CanvasFrame(caption, 1.0);
// Request closing of the application when the image window is closed.
canvas.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
// Convert from OpenCV Mat to Java Buffered image for display
final OpenCVFrameConverter converter = new OpenCVFrameConverter.ToMat();
// Show image on window. //Inside while loop in FaceRecognitionWebcam.java
canvas.showImage(converter.convert(image));`