MinimumOpenCVLiveCamera icon indicating copy to clipboard operation
MinimumOpenCVLiveCamera copied to clipboard

Only grayscale image is shown

Open samsonwyt opened this issue 7 years ago • 4 comments

It seems that only gray image is displayed in the camera view.

samsonwyt avatar Oct 07 '17 16:10 samsonwyt

I am using Swift 4.

samsonwyt avatar Oct 07 '17 16:10 samsonwyt

Yes. you can rewrite the codes converting camera image into gray with anything you want.

And sorry, this project is old and I didn’t have time to migrate to Swift 4...

2017/10/08 1:36、samsonwyt [email protected]のメール:

It seems that only gray image is displayed in the camera view.

― You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

akira108 avatar Oct 08 '17 01:10 akira108

I mean I didn't really change to code, with

output.videoSettings = @{(NSString *)kCVPixelBufferPixelFormatTypeKey : @(kCVPixelFormatType_32BGRA)};

and

Mat mat = Mat(height, width, CV_8UC4, base);

but it still displays grayscale outputs :(

samsonwyt avatar Oct 08 '17 03:10 samsonwyt

even using the official demo

samsonwyt avatar Oct 08 '17 03:10 samsonwyt