Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/www/domains/hppgallery_com/design/defaulttheme/tpl/pagelayouts/main.php on line 59

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/www/domains/hppgallery_com/design/defaulttheme/tpl/pagelayouts/main.php on line 59
Wednesday, September 20, 2017
 

Color Indexer

Color indexer is alternative to standard color indexing and is 24x~ faster than standard method using php and mysql. On commodity server, in php environment, script can index ~11 images per second. This utility uses opencv library

 

color_indexer application was writeln by me for gallery purposes. It features:

  • Custom pallete support, up-to 200 colors in pallete, that can be changed by recompiling application.
  • Custom treshold value

How to compile?

cd bin/color_indexer/
./compile.sh

Color indexer depends on opencv library, in centos it can be installed by typing

yum install opencv-devel

How to use it?

Usage: color_indexer <image-file-name> <pallete-file-name> <threshold> <inside_height> <inside_width> <method>

Example

./bin/color_indexer/color_indexer bin/color_indexer/forest.jpg doc/color_palletes/color_pallete.txt 25 100 100 rectangle

If you get error executing this command try to install opencv library

yum install opencv

Expected output:

  1. Left variable represents pallete_id
  2. Right item represents how many times color item was matched

<pallete_id>-<count>

10-1477
11-1193
12-391
13-357
14-186
21-59
30-764
40-1345
41-180
48-39
49-95
50-1579
51-308
52-256
60-1553
61-138
62-190
63-89
69-35
70-1229
71-115
72-174
73-179
78-42
79-95
80-1037
81-80
82-120
83-96
89-35
90-547
91-159
100-347
101-59
107-46
110-104
113-34
114-45
115-75
116-167
117-235
118-73
119-46

What is collor_pallete.txt file structure?

<pallete_id>;<red>;<green>;<blue>

Example:

1;213;245;254;20
2;174;235;253;40

Last item is position, but it's optional.

Ellipse uses region like this:

------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------+++++++++++++-----------------------------------------------------
--------------------------------------------------+++++++++++++++++++++-------------------------------------------------
-----------------------------------------------+++++++++++++++++++++++++++----------------------------------------------
--------------------------------------------+++++++++++++++++++++++++++++++++-------------------------------------------
------------------------------------------+++++++++++++++++++++++++++++++++++++-----------------------------------------
----------------------------------------+++++++++++++++++++++++++++++++++++++++++---------------------------------------
---------------------------------------+++++++++++++++++++++++++++++++++++++++++++--------------------------------------
-------------------------------------+++++++++++++++++++++++++++++++++++++++++++++++------------------------------------
------------------------------------+++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
-----------------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------
----------------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
---------------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------
--------------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------
-------------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
------------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------
-----------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------
----------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------
---------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------
---------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------
--------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------
-------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------
-------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------
------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
-----------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------
-----------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------
----------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------
----------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------
----------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------
---------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------
---------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------
---------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------
--------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------
--------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------
--------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------
--------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
-------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
--------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------
--------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------
--------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------
--------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------
---------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------
---------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------
---------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------
----------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------
----------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------
----------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------
-----------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------
-----------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------
------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
-------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------
-------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------
--------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------
---------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------
---------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------
----------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------
-----------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------
------------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------
-------------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
--------------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------
---------------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------
----------------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
-----------------------------------+++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------
------------------------------------+++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
-------------------------------------+++++++++++++++++++++++++++++++++++++++++++++++------------------------------------
---------------------------------------+++++++++++++++++++++++++++++++++++++++++++--------------------------------------
----------------------------------------+++++++++++++++++++++++++++++++++++++++++---------------------------------------
------------------------------------------+++++++++++++++++++++++++++++++++++++-----------------------------------------
--------------------------------------------+++++++++++++++++++++++++++++++++-------------------------------------------
-----------------------------------------------+++++++++++++++++++++++++++----------------------------------------------
--------------------------------------------------+++++++++++++++++++++-------------------------------------------------
------------------------------------------------------+++++++++++++-----------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------
Back »

Comments: 0

Leave a reply »

 
  • Leave a Reply
    Your gravatar
    Your Name
     
     
     
     
 
About HPPG

High performance photo gallery dedicated for large numbers of image storage.

Get in touch

Donate



Download