Yii Framework Forum: Serch images by color - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Serch images by color Rate Topic: -----

#1 User is offline   KJedi 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 381
  • Joined: 19-October 08
  • Location:Nikolaev, Ukraine (Europe)

Posted 11 September 2009 - 03:28 AM

Recently I found very interesting thing - google image search implementes searching by colour - you select the colour and get images that match it. Results are VERY relevant. The same thing is done on the shutterstock.com (http://www.shutterst...color=%23ff54df)
The question is - how this is done? What is the approach for this?
I think this is a very useful tool for price comparison websites (I'm working at one of them currently), so I'd like to know how to do this.
Posted Image
My Blog: http://programmersnotes.info/ - tips, design patterns, client and server-side coding, yii articles and simply my experience.

Follow me on twitter: http://twitter.com/KonstantinMirin
Add me to your friends on facebook: http://www.facebook....hp?id=784832902
0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,428
  • Joined: 17-January 09
  • Location:Russia

Posted 11 September 2009 - 06:03 AM

I think some kind of color reduction filter is applied. Then palette is extracted from an image and saved to DB. Also it seems that they are saving amount of pixels filled with a colors from a palette.

Then you have values like this:
image1
#fff 123
#000 299
#f0c 233

and can compare images based on it.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#3 User is offline   KJedi 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 381
  • Joined: 19-October 08
  • Location:Nikolaev, Ukraine (Europe)

Posted 11 September 2009 - 11:15 AM

Good idea. But I think there should also be some jind of "approximate" search. e.g. user selects #ff05AD and image contains 80% of #ff05AE which is actually nearly the same colour...

Any more info or articles on this topic?
Posted Image
My Blog: http://programmersnotes.info/ - tips, design patterns, client and server-side coding, yii articles and simply my experience.

Follow me on twitter: http://twitter.com/KonstantinMirin
Add me to your friends on facebook: http://www.facebook....hp?id=784832902
0

#4 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,428
  • Joined: 17-January 09
  • Location:Russia

Posted 12 September 2009 - 12:32 PM

Of course you should use quantization first for both image searched and the parameter color you are searching for. It's described in various captcha breaking techniques.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users