Highgui and Ruby

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:

  1. Make sure xcode-select --install Xcode command line tools 5.0.1 are installed.
  2. Install python using brew - brew install python.
  3. pip update
  4. pip install numpy
  5. brew linkapps
  6. Add export PYTHONPATH=/usr/local/Cellar/opencv/2.4.6.1/lib/python2.7/site-packages:$PYTHONPATH to .bash_profile
  7. 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



Leave a reply



Submit