
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Built with :yellow_heart: and :coffee: in San Francisco
OpenCV is a great library for writing Computer Vision software. However, OpenCV's HSV format is different than what you would expect! This gem trys to learn HSV color range from sample images for your OpenCV program to detect color.
Add this line to your application's Gemfile:
gem 'opencv-color'
And then execute:
$ bundle
Or install it yourself as:
$ gem install opencv-color
Usage: opencv-color [options] <sample images directory path>
-f, --format [FORMAT] Output format 'yaml' or 'objc', default is yaml
-h, --help Show this message
Put your color sample images into the following structure:
See color-samples directory as example.
Run opencv-color command to extract color range data:
opencv-color <color samples root directory> > color-data.yml
The output data is a YAML dump of a Ruby Hash object:
{color name => {low: HSV color CvScalar array format, high: HSV color CvScalar array format}}
Use the data in your application, the following example uses ruby-opencv gem:
include OpenCV
colors = YAML.load(File.read('color-data.yml'))
low = CvScalar.new(*colors['blue']['low'])
high = CvScalar.new(*colors['blue']['high'])
image = IplImage.load('picture.png', CV_LOAD_IMAGE_ANYCOLOR | CV_LOAD_IMAGE_ANYDEPTH)
image.BGR2HSV.in_range(low, high)
....
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that opencv-color demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.