[vlc-devel] [PATCH 2/7] opencv: Refresh the internal opencv_example filter to match the updated wrapper
Edward Wang
edward.c.wang at compdigitec.com
Thu Aug 9 21:19:10 CEST 2012
This also makes it work.
---
modules/video_filter/opencv_example.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/modules/video_filter/opencv_example.c b/modules/video_filter/opencv_example.c
index b32cdcd..4a042dc 100644
--- a/modules/video_filter/opencv_example.c
+++ b/modules/video_filter/opencv_example.c
@@ -3,9 +3,11 @@
* (performs face identification). Mostly taken from the facedetect.c
* OpenCV sample.
*****************************************************************************
- * Copyright (C) 2006 the VideoLAN team
+ * Copyright (C) 2006-2012 the VideoLAN team
+ * Copyright (C) 2012 Edward Wang
*
* Authors: Dugal Harris <dugalh at protoclea.co.za>
+ * Edward Wang <edward.c.wang at compdigitec.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -154,7 +156,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
return NULL;
}
//(hack) cast the picture_t to array of IplImage*
- p_img = (IplImage**) p_pic->p[0].p_pixels;
+ p_img = (IplImage**) p_pic;
i_planes = p_pic->i_planes;
//check the image array for validity
@@ -163,16 +165,6 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
msg_Err( p_filter, "no image" );
return NULL;
}
- if ((p_pic->format.i_chroma != VLC_CODEC_I420))
- {
- msg_Err( p_filter, "wrong chroma - use I420" );
- return NULL;
- }
- if (i_planes<1)
- {
- msg_Err( p_filter, "no image planes" );
- return NULL;
- }
//perform face detection
cvClearMemStorage(p_sys->p_storage);
--
1.7.5.4
More information about the vlc-devel
mailing list