detection

Dumping text files

I'm writing a shell script that will create a textual (i.e. diffable) dump of an archive. I'd like to detect whether or not each file is printable in some given character set, and if it is printable, I'd like to convert to that character set from whatever one it's in, if this is possible, and make its contents part of the dump. I've co...

detecting rectangle and the 4 corner coordinates from an image in opencv

hello i was going through the the program "square.c" in the sample of opencv which is working fyn in detecting rectangles in a given image and generates outline.. the array pt[] store the boundry points of rectangle....but what i need is only the 4 corner points of the rectangle...... need help thanks ...

Laser light detection with OpenCV and C++

Hi all, I want to track a laser light dot(which is on a wall) with a webcam and i am using openCV to do this task. can anybody suggest me a way to do it with C++. Thank you ! ...

Jquery, finding the type of a selector - howto?

I need a way to determine if a returned object is a textarea (for example). ...

Getting URL from a child iframe

Is it 100% impossible to get the browser URL from the iframe html of an iframe that is loaded onto a separate domain? I tried javascript and it did not work. What language could I do this in? Thanks! UPDATE Thanks for the help! PHP does work. <?php if(isset($_SERVER['HTTP_REFERER'])) { echo $_SERVER['HTTP_REFERER']; }?> ...

Programmatically detect if Windows Media Player is installed

Anybody have any advice on how to programmatically detect if Windows Media Player is installed? I know about the registry setting look up, but don't trust it since it's more than a little misleading (uninstalled may not remove it). And I've considered just launching a video, but an error could be caused by something other than Media Pl...

Eye Detection Using Opencv

I am working on object detection (eyes) using OpenCV. Following is the code as it is not able to identify an eye object (exactly or near by). Can anyone help me solve this problem? if(imageView.image) { cvSetErrMode(CV_ErrModeParent); IplImage *image = [self CreateIplImageFromUIImage:imageView.image]; // Scaling down IplImage ...

Makefile that distincts between Windows and Unix-like systems

I would like to have the same Makefile for building on Linux and on Windows. I use the default GNU make on Linux and the mingw32-make (also GNU make) on Windows. I want the Makefile to detect whether it operates on Windows or Linux. For example make clean command on Windows looks like: clean: del $(DESTDIR_TARGET) But on Linu...

How to find all implementations of a certain interface?

I want to make my program initialization a bit "smarter". I have several classes which represent commands. All these classes are immutable (i.e. creating only one instance of each should be enough for the whole application). All these classes implement Command interface. I think that the fact that some classes are placed in the same ...

C/C++/Obj-C Real-time algorithm to ascertain Note (not Pitch) from Vocal Input

I want to detect not the pitch, but the pitch class of a sung note. So, whether it is C4 or C5 is not important: they must both be detected as C. Imagine the 12 semitones arranged on a clock face, with the needle pointing to the pitch class. That's what I'm after! ideally I would like to be able to tell whether the sung note is s...

Where Should Collision Detection Code Be?

Hi guys, I'm writing a pong game and I have a ball class that has velocity x, y, positions and all that stuff that every frame is updated by calling @ball.update, this moves the ball forward by its x_vel and Y_vel etc. My question is Should my collision code be in the loop or in the update method of the ball class? Or should it all be in...