Anonymous avatar Anonymous committed a1228ba

now its ok ...

Comments (0)

Files changed (4)

sample/script/test.script

-Source(WEBCAM)
+Source(titi.avi)
 Output(tata.avi)
 Output(WEBCAM)
 #Filter(EdgeDetection)
-Filter(Erode)
+#Filter(Erode)
 Filter(BlackWhite)
-#Filter(Dilate)
+Filter(Dilate)

src/filter/BlackWhiteFilter.cc

   if (!img)
     printf("img null in canny filter\n");
   IplImage* out;
-  if (!cvGetImageCOI(img))
-    out = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 1);
-  else
-    out = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, cvGetImageCOI(img));
+  out = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 1);
   cvCvtColor(img, out, CV_BGR2GRAY);
 
   return out;

src/filter/DilateFilter.cc

   if (!img)
     printf("img null in dilate filter\n");
   IplImage* out;
-  if (!cvGetImageCOI(img))
-    out = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 3);
-  else
-    out = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, cvGetImageCOI(img));
+  out = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, img->nChannels);
   cvDilate(img, out, 0, 5);
 
   return out;

src/filter/ErodeFilter.cc

   if (!img)
     printf("img null in canny filter\n");
   IplImage* out;
-  if (!cvGetImageCOI(img))
-    out = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 3);
-  else
-    out = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, cvGetImageCOI(img));
+  out = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, img->nChannels);
   cvErode(img, out, 0, 5);
 
   return out;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.