Capture webcam's image with Ruby
This looks good http://www.wedesoft.demon.co.uk/hornetseye-api/files/HornetsEye-txt.html although I don't have any experience using it.
Open and save image in OpenCV makes image a lot larger (ruby-opencv)
Here it is as an answer:
It is probably because CV_IMWRITE_JPEG_QUALITY
is set to 95. You might want to try out cv::imwrite and set the quality to something that you want. For further details, you can refer to the cv::imwrite documentation..
Supplementary reading as added by @mydoghasworms : OpenCV cvSaveImage Jpeg Compression Factor
Example solution in Ruby setting JPEG quality to 20:
require 'opencv'
include OpenCV
image = CvMat.load("samples/CIMG0388.JPG")
image.save("samples/CIMG0388_2.JPG", {CV_IMWRITE_JPEG_QUALITY => 20})
Opencv install on os x 10.9 fails
You can try to install opencv from homebrew, I met the same problem with cmake in my 10.9 and finally I found the solution from Chris Muktar. Here are the steps:
- Make sure xcode-select --install Xcode command line tools 5.0.1 are installed.
- Install python using brew - brew install python.
- pip update
- pip install numpy
- brew linkapps
- Add export PYTHONPATH=/usr/local/Cellar/opencv/2.4.6.1/lib/python2.7/site-packages:$PYTHONPATH to .bash_profile
- brew install opencv
In the last step I came across the Error: No available formula for opencv. In this case, you should first run the command brew tap homebrew/science.
Good Luck
OpenCV 3.0.0: How to display trackbar at top of window in Ubuntu 14.04
You can't do that! OpenCV GUIs features are just for building fast prototypes. To build more advanced GUIs you need to use a 3rd party libraries like Qt.
A while back I wrote this simple Qt/OpenCV application to load an image with OpenCV and display it on a QMainWindow. By the way, Qt's trackbar name is QSlider.
Related Topics
How Does Count Method Works in Ruby
Cron Is Running in Home Directory Instead of File Directory
Ruby on Rails - Activerecord::Relation Count Method Is Wrong
More Concise Version of Max/Min Without the Block
Why Can't I Create an Array as a Column in a Table in Rails
Scraping a Site That Requires Login Username and Password on Two Separate Pages
Error Building Ruby in Sublime Text Editor
Activerecord::Associationtypemismatch in Controller#Create on Dropdown Select for a Rails Self Join
Rails Error Message Displays Key and I Only Want Value
Nested Form_For Singular Resource
Ruby Private Attr_Accessor and Unexpected Nil
How to Convert PDF to Excel or CSV in Rails 4
Why Is My Ruby Git Script Hook Run with the Wrong $Path
Ruby Looks for Class Variable in the Object Instead of Specific Class
Pg::Error: Error: Invalid Byte Sequence for Encoding "Utf8": 0Xfc
Ruby - Return Byte Array Containing Two's Complement Representation of Bignum/Fixnum