From 56bff1dc8cbafd718b5733f22bdb63ab4767703b Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Tue, 19 Jun 2018 22:06:39 +0000
Subject: [PATCH] Fixed darknet.py when OpenCV is used (added BGR to RGB conversion)
---
src/image.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/image.c b/src/image.c
index 5313964..dd0098f 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1068,6 +1068,18 @@
return im;
}
+int get_stream_fps(CvCapture *cap, int cpp_video_capture)
+{
+ int fps = 25;
+ if (cpp_video_capture) {
+ fps = get_stream_fps_cpp(cap);
+ }
+ else {
+ fps = cvGetCaptureProperty(cap, CV_CAP_PROP_FPS);
+ }
+ return fps;
+}
+
void save_image_jpg(image p, const char *name)
{
image copy = copy_image(p);
--
Gitblit v1.10.0