ofxFern How to get x,y position and learn new Image

Hi @theo

I downloaded your OF addon, I had problems making the example project run, I had to import missing frameworks like Accelerate.framework, CoreVideo.frameworks, QT.framework, and also I had to download a standalone version of OpenCV and dragged and dropped into the project in order for the project to compile. Should this be incorporated to your how to install instructions on the Github page?

And finally, I have this 3 questions

  • How do I make it learn more images ?
  • Can the addon detect multiple images ? (can it detect them at the same time? )
  • How can I can I get the x,y position of the tracked image?

it would be very much appreciated if you could tell me how to do that. :smile:



Sorry its not clear.
I should update the ReadMe

To track a new image replace the model.bmp and put the four corners of the marker in the model.bmp.roi file. Then delta the other two files (detector and tracker data)

When your app runs it will then do the training phase which can take a couple of minutes.

You can pull the position of the four corners from ofxFern::trackedMarker


Hey Theo! Great addon.

I’m still a bit confused on how to add new images. I loaded up photoshop and popped out a BMP (does it need to be a certain bit depth or anything?) and threw it into the folder. It was a picture of a puppy 970x970 so in model.bmp.roi I just did:

0 0
970 0
970 970
0 970

I’m not sure what you mean by ‘delta the other two files’ would you mind explaining? I removed them from the folder. When I load up the app it just stalls after a while. Any help would be GREATLY appreciated :slight_smile:

I should note that for anyone having problems compiling the Fern demo, this fork did the trick for me. https://github.com/paulobarcelos/ofxFern