How to find all the colors in a photo with Ruby - ruby

Does anyone know of a Ruby library that can list all of the colors in a photo, as well as listing them in order of frequency? Or is it possible that RMagick already can do something like this?
If no one knows of one, how exactly could I get started on making such a tool? I have a great idea for a program I'd love to try, however I just don't know much about image processing as I've never done it.
I'd be very grateful for any tips or info to point me in the right direction! Thanks!

color_histogram

Related

create a simple (and visible!) UI slider in Unity 5

![enter image description here][1]please I need some help, this should apparently be something very simple and basic to do, but maybe I'm missing something.
I'm quite newbie to Unity3d, I had no much problem with creating a somewhat flashy 2.D scene (I mean 2D with different layers in Z level), scripts, etc. But I'm having trouble to create a "UI Slider" object: when I create it, it just shows nothing on screen. How can I make it visible? I just need to create a very simple, plain slider whose value can be controlled at runtime by means of a script.
thanks.
Well.. since you give nothing to go on, I suggest that you take a look at a tutorial for the UI:
https://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/using-the-ui-tools
If you have troubles after this tutorial, come back with an example of your problem to make people more willing to sacrifice their time in helping you.
Hope this is somewhat useful
Take a look at the Unity3D docs here.
http://docs.unity3d.com/Manual/script-Slider.html
It should have what you are looking for.

Rotating a UIButton?

I am trying to rotate a UIButton so it looks more like a diamond instead of a square. I have searched a lot on the site and could not find anything that could help me. I am having a lot of trouble with this and need some help. I think it will increase the appeal of my app when it is running. This is a problem I have had for a while and have been struggling with so anything can help me. I don't know if this is a built in feature in Xcode or if I need to do this programmatically.
Any suggestions would be greatly appreciated.
Thanks in advance.
You could simply apply an affine transform to the button. Something like this:
import Darwin
...
myButton.transform = CGAffineTransformMakeRotation(M_PI/2)
However, that will rotate the entire button, including the title. If that's not what you want then it gets more complicated.

Data Stream in Shoes

This may not be a very specific question, but any help or points in the right direction would be greatly appreciated. I am trying to make a shoes app for myself that will display stock quotes, I'm thinking ahead and the issue I run into is that I would like to have streaming quotes. I can grab this data from any finance site, and that isn't the issue, but what I am concerned about is how to update the view in the Shoes app. Can anyone lead me in the right direction to creating an app that will update text in my app every X seconds, or possibly a daemon that does it continuously. Literally any help is appreciated, as you can probably tell from the question, I definitely need some help!
You are interested in Timers. They let you call procs basing on the interval given.
The good starting point is the code of clock example.
shoes -m
in command line will start shoes in help mode.
Hope it helps.

OpenCV compare images

I need help with OpenCV to solve the following problem:
I have some pictures of one place
Each photo compare with the first
in the photos except the first I need to draw the frames where there was a change
Can anyone advise me or recommend a prime example?
That sounds like a job for background substraction.
BackgroundSubtractorMOG2 is the class you will probably want.
I have not used it myself, but here is a tutorial

How to locate position/coordinates of faces in photo through code?

I know about face.com and its cool API. But it only identifies the people in the photo. I really dont need that. I want to able to detect the position (as in x,y,width and height) of face(s) in a given 2d photo. If anyone know of an ongoing project, of available projects, please help me out with some links, tips and or advice. Deeply appreciate that. Thanks
Use OpenCV Face detector. It gives x,y,width,height

Resources