Skip to content

An example app using the ocv_photo_analyzer gem to provide a histogram and color clustering. As described in a blog post at: https://nerves.build/posts/ocv_photo_analyzer

Notifications You must be signed in to change notification settings

nerves-build/ocv_photo_analyzer_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OcvPhotoAnalyzerExample

This is the sample app for the blog post at:

https://nerves.build/posts/ocv_photo_analyzer

In order to run the project you must set the following value

config :ocv_photo_analyzer_example, Photos.Photo, base_path: "APP_DIR/priv/static/uploads"

You can change the location of the uploaded photos if you like through this config:

config :upload, Upload.Adapters.Local, storage_path: "priv/static/uploads", public_path: "/uploads"

You can also control the values ocv_photo_analyzer uses for determining dominant colors. These are the default values:

config :ocv_photo_analyzer, OcvPhotoAnalyzer.Analyzer, clusters: 5, iterations: 10, attempts: 5, precision: 0.1, analysis_size: 1000

The details of these parameters are discussed here: https://docs.opencv.org/2.4/modules/core/doc/clustering.html

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.create && mix ecto.migrate
  • Install Node.js dependencies with cd assets && npm install
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000 from your browser.

About

An example app using the ocv_photo_analyzer gem to provide a histogram and color clustering. As described in a blog post at: https://nerves.build/posts/ocv_photo_analyzer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published