
Research
Security News
The Landscape of Malicious Open Source Packages: 2025 Mid‑Year Threat Report
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
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.
Research
Security News
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.