i’ve tried to “copy” this function to make it work with a ofCvColorImage.
basically i pasted the same function and changed grayscale to color image.
i’m not getting good results and now several questions arise …
* it’s hard to me to understand how this code works and i’m not sure if my easy approach of “copy” and rename it’s just a silly way … or if there’s a chance to make it work ?¿
* sorry but … a basic question : the idea of this function is to be called from an ofCvGrayscaleImage (the destination) and the parameter is another ofCvGrayscale image, let’s say the source ?
* in the example i’m trying to make run i need to Deinterlace a DV camera which is outputting via analogic video signal, which is captured trough a USB analogic capture board … is it possible to do so ? i mean, does the image to be deinterlaced need to be grabbed from a DV device or it’s possible to de-interlace a DV signal captured with an analogic board (at 720x576 capture resolution) ?
worked for me on deinterlacing off a 640x480 capture card and a security camera. it’s pretty simple, I guess you’d get good results. I was amazed at how easy it was.
take care!
zach
ps: looking at the code I think there is a small bug in to top line and bottom line, they must come out black, or something else – I didn’t notice because my source was on a black background. I’ll probably revise the code when I get a free moment to fix that.
thanks for your explanation … i do understand the concept of the algorithm but i’m not so familiar with CvImages in ofCv, and less in color space to know how to translate it to color…
i’ll try to revise it and see if i can get a ofCvColor solution…
another chance would be to implement that on a GLSL shader, maybe it will be easier for me to work it out … i’ll let u know
Thanks for that code, just what i needed. Optimized a bit and made it in place.
I realized that if the image has even number of lines, which i think it usually has, the last line will be left false. Thats the reason for the last if statement which just duplicates the next last line. The last line is not visible when you draw the image (due to some border pixel problems mentioned in ofTexture?), but i think this generates a good image for tracking.
That’s because the deinterlace function is not part of the original ofxCvGrayscaleImage. You need to add it based on the code i provided above. You can either extend ofxCvGrayscaleImage as myCvGrayscaleImage or do the ugly version of just adding it to the original .h and .cpp files.
I have a simple line averaging GLSL and Core Image based deinterlacer that works pretty good, at HD (1080i) resolutions in realtime on any decent hardware…
Hi!
I am new to C++. I wanted a deinterlacing algorithm to combat motion blur. But I do not know how to use the above code as deinterlace is not a function in the class ofxCvGrayscaleImage. I think I will also have to include the relevant header files of “ofxCvGrayscaleImage”.
The example code is in a custom function added by @zach, it isn’t in the code openFrameworks code. You can create the custom function in your ofApp or anywhere else you like.
Yes. I understand that it is a custom made function. But I do not understand the internal structure of the function to use it according to my needs. As far as I have seen there is no function named cvImage in the class ofxCvGrayscaleImage to access it via the object mom. I am still confused. Kindly help.