Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IplImage from java.awt.image.BufferedImage #10

Open
arronmabrey opened this issue Mar 25, 2015 · 0 comments
Open

IplImage from java.awt.image.BufferedImage #10

arronmabrey opened this issue Mar 25, 2015 · 0 comments

Comments

@arronmabrey
Copy link

Hi @nakkaya,

I'm looking to use the template_matching functionality, like in the example
https://github.com/nakkaya/vision/blob/master/resources/examples/template_match.clj

(ns template-match
  (:use [vision core] :reload-all))

(let [raw (load-image "resources/samples/template-input.png" :color)
      template (load-image "resources/samples/template-match.png" :color)
      [width height] (image-size template)
      [min max min-x min-y max-x max-y] (match-template raw template :ccorr-normed)]
  (rectangle raw [max-x max-y] [(+ max-x width) (+ max-y height)] java.awt.Color/blue 2)
  (view :result raw))

The difference being, for the raw image, I already have an instance of java.awt.image.BufferedImage that exists only in memory (the image is not persisted on disk).

Is it possible to create an instance IplImage from the BufferedImage, preferable without copying the bits?

-- Arron

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant