Hello.
I’m using opencv in Kotlin(android).
the problem is that when I save the frame, color is changed compare with original video file.
when I caputre frame with Android VideoPlayer, Color doesn’t change
and Caputre with opencv on PC(window), Color doesn’t change
but I caputre with opencv on Android, Color change.
what can I do for this. please help me
here is my code
var videoCapture = VideoCapture(tempFile.absolutePath, CAP_ANDROID) videoCapture.set(Videoio.CAP_PROP_POS_MSEC, 100)
val frame = Mat()
videoCapture.read(frame)
var rgbImage = Mat()
Imgproc.cvtColor(mat, rgbImage, Imgproc.COLOR_BGR2RGB)
Imgcodecs.imwrite(savePath, rgbImage)