2013年12月8日星期日

Fingerprint java + Google Image recognition technology ======= share out source to achieve === ===

java Fingerprint + Google image recognition technology

Recently saw this " principle similar image search " blog on Ruan Yifeng 's blog , there is an impulse to want to achieve out of these principles .


wrote a demo of picture identification

provide source code download , source code download link: http://download.csdn.net/detail/yjflinchong/4232770

to try the effect of it



Google " Similar Image Search " : You can use an image search on the Internet for all its similar images .

Open Google Image Search page :


Click to upload a angelababy original use :


After clicking search , Google will identify with similar images , pictures more similarity higher top surface . Such as:


What is the principle of this technique ? Computer how to know two pictures similar to it ?

According to Dr. Neal Krawetz explanation to achieve similar image search key technology elements called " perceptual hash algorithm " (Perceptualhash algorithm), its role is to generate a "fingerprint" for each picture (fingerprint) string, and then compare the different pictures of fingerprints. The closer the results , it shows more similar pictures .



The following is a simple Java implementation:



pretreatment : Reading Pictures


First, reduce the size .

pictures down to 8x8 size, a total of 64 pixels. This step is to remove the role of the details of the picture , leaving only the structure , shading , and other basic information , get rid of different sizes , the proportion of the differences brought pictures .


The second step, to simplify color .

will be reduced after the picture turned 64 shades of gray. That is, all pixels total of only 64 colors .


The third step is to calculate the average .

calculate the average of all 64 gray pixels .


fourth step, comparing pixel gray .

The gradation of each pixel , and compares the average value . Greater than or equal to the average , denoted by 1 ; less than the average , denoted by 0 .


fifth step, compute the hash value.

The results of the comparison step , together, constitute a 64- bit integer , which is this picture of a fingerprint . Mix order is not important , as long as the guarantee that all pictures are used in the same order on the line.

After
get fingerprints , you can compare different pictures and see how many 64 -bit is not the same . In theory , this is equivalent to calculating " Hamming distance " (Hammingdistance). If not the same data bit is not more than 5 , it shows two pictures are very similar ; If greater than 10, it stated that this is two different pictures .


You can put together a few pictures , but also to calculate the contrast of their Hamming distance , you can see two images are similar.



advantage of this algorithm is simple and fast , free pictures size scaling effects , the disadvantage is the content of the image can not be changed . If you add a few words on the picture , it will not recognize it . So , it 's best use is based on the thumbnails to find artwork .



practical applications , often using more powerful algorithms and pHash SIFT algorithm , they are able to identify the deformation of the picture. As long as no more than 25% degree of deformation , which can match the original . Although these algorithms more complicated , but the principle is simple with the above algorithm is the same , that is, the first image into Hash string , and then compared.


Most of the above Ruan Yifeng copied directly from the site over, want to see the original shoes can go click on the link at the top to go see .


provide source code download , source code download link: http://download.csdn.net/detail/yjflinchong/4232770
- ----- Solution --------------------------------------------
to see
------ Solution ---------------------------------- ----------
sf_yf@sina.com
you know drop ...
------ Solution ------------------------------ --------------
byg760@hotmail.com
------ Solution ------------------ --------------------------
312983516@qq.com LZ understand the way to get points ~ ~ < br> ------ Solution ----------------------------------------- ---
549177803@qq.com
Thank LZ
------ Solution ---------------------------------- ----------
371508932@qq.com seeking the source code ah
------ Solution ------------------ --------------------------
landlord, you will this ah ! Oh , send me a look 279417447@qq.cpm
------ Solution --------------------- -----------------------
showsen.com @ 163.com
Thank
------ Solution ----------------------------------- ---------
I have the code ! duanpan916@yahoo.cn
------ Solution ----------------------------------- ---------

program should have a code of ape ! szy3121@163.com

------ Solution ------------------------------------ --------
578646730@qq.com
------ Solution ------------------------ --------------------
there code is king . chenw323@163.com
Thank you, landlord
------ Solution ---------------------------------- ----------
fwsong1@163.com
thank for sharing ~ ~ ~ ~ ~
------ Solution ---------------------------- ----------------
380316176@qq.com
Thank you, landlord
------ Solution ---------------------------------- ----------
58617581@qq.com landlord mighty ~ ~ ~ ~ ~
------ Solution ---------- ----------------------------------
qhdkunpeng@163.com
----- - Solution --------------------------------------------
592253905 @ qq.com
here to thank landlord !
------ Solution ------------------------------ --------------
18616091337@163.com
Thank you to share.
------ Solution ---------------------------------------- ----
835369950@qq.com landlord good
------ Solution -------------------------- ------------------
mighty .
------ For reference only -------------------------------------- -
  The reply was deleted on 2012-04-17 16:53:00 moderator

------ For reference only ---------------------------------- -----
I tried. operating results came out. for your reference

Resources:
[f4c4c0c0f0888c07, ffff008cfcfcfcff, 7f7f47037f7f7f74, 7f7f004f7f7f7c7f, 7f7f004f7f7f7c7f, 7f7f004f7f7f007f]

Source:
7f7f004f7f7f7c7f

Hamming distance : 14 source.jpg picture is completely different now example1.jpg
Hamming distance : 10 source.jpg picture is somewhat similar with example2.jpg
Hamming distance : 6 source.jpg picture is somewhat similar with example3.jpg
Hamming distance : 0 source.jpg the same picture with example4.jpg
Hamming distance : 0 source.jpg the same picture with example5.jpg
Hamming distance : 2 source.jpg very similar picture with example6.jpg

------ For reference only ---------------------------------- -----
effect can be it .
------ For reference only ------------------------------------ ---


reply mail a friend

I try to package source code sent to you mailbox


------ For reference only ---------------------------------- -----
wiley.wang @ 163.com
------ For reference only ----------------------- ----------------


you have a code ? hear you say it like Uncensored
------ For reference only -------------------------- -------------
LZ hard
lltthh@yeah.net
------ For reference only ----------------------------- ----------
472852263@qq.com
I have a code , but also a comment. . !
allowed to criticize greedy ah. . .
------ For reference only -------------------------------------- -
commendable
------ For reference only ------------------------------- --------
download them to see , do not know how high recognition accuracy will
------ For reference only ------------ ---------------------------
to see
------ For reference only ----- ----------------------------------
jaysnsky@gmail.com
----- - For reference only ---------------------------------------
32 floor chick , good length , the landlord must send out a code !
------ For reference only -------------------------------------- -
long410381@126.com
------ For reference only ----------------------------- ----------


is a bit greedy . However, the code has . Notes there . test image , too. demo has
------ For reference only --------------------------------- ------
zqfddqr@163.com
------ For reference only ----------------------- ----------------
444534644@qq.com
Thank landlord
------ For reference only -------------------------------- -------
111198273@163.com
landlord to help me find a copy of it to Kazakhstan
------ For reference only ---------------------- -----------------
test print :

Resources:
[f4c4c0c0f0888c07, ffff008cfcfcfcff, 7f7f47037f7f7f74, 7f7f004f7f7f7c7f, 7f7f004f7f7f7c7f, 7f7f004f7f7f007f]

Source:
7f7f004f7f7f7c7f

Hamming distance : 14 source.jpg picture is completely different now example1.jpg
Hamming distance : 10 source.jpg picture is somewhat similar with example2.jpg
Hamming distance : 6 source.jpg picture is somewhat similar with example3.jpg
Hamming distance : 0 source.jpg the same picture with example4.jpg
Hamming distance : 0 source.jpg the same picture with example5.jpg
Hamming distance : 2 source.jpg pictures with example6.jpg very similar
------ For reference only ------------------ ---------------------
iwxobbs@163.com thank the landlord , concerned
------ For reference only ----- ----------------------------------
landlord powerful ! 573237639@qq.com Thank
------ For reference only ------------------------------ ---------
1481017918@qq.com
------ For reference only --------------------- ------------------
seeking source landlord he1shan4hai3@yeah.net
------ For reference only ----- ----------------------------------
bunker
------ For reference only ---------------------------------------
landlord hard 1987v5@sina.com
------ For reference only -------------------------------------- -
thank the donor -
[email = shineboyw@yahoo.com.cn] [/ email]
------ For reference only ------------------- --------------------
61917380@qq.com

Thanks for sharing .
------ For reference only -------------------------------------- -
liuzheng4626846@vip.qq.com

Thanks for sharing ! grateful
------ For reference only --------------------------------- ------
zfl110@163.com
lz send me down , thank you
------ For reference only -------------------------- -------------
lxyanfei@126.com
Thank you, landlord
------ For reference only -------------------------------- -------
yq510457@163.com

LZ, hard ! !
------ For reference only -------------------------------------- -
LZ there is no similar fingerprint images set yet. Fingerprint test to see how effective it .
------ For reference only -------------------------------------- -
not wishlists it? ? ?
------ For reference only -------------------------------------- -
want to see results, send one to me , thank you!
a123456789bingxiao@126.com
------ For reference only ----------------------------- ----------
perceptual hashing algorithm
------ For reference only --------------------- ------------------
601820665@qq.com
Thank you sharing
------ For reference only -------------------------------- -------
want to see renderings
------ For reference only ------------------------ ---------------
598091295@qq.com
Thank landlord
------ For reference only -------------------------------- -------
candysobraveness@msn.cn
------ For reference only ----------------------- ----------------
jiyong012@163.com
------ For reference only -------------- -------------------------

beginner java passing , support what
------ For reference only ---------------------------------------
252500370@qq.com
------ For reference only --------------------------------------- < br> 15005233577@126.com
------ For reference only ------------------------------- --------
learn about, thank you landlord
252500370@qq.com
------ For reference only ----------------------------- ----------
bgacyj@163.com Thank
------ For reference only ---------------- -----------------------
wakaoyun@gmail.com, you know
------ For reference only --- ------------------------------------
lz really v5 top one .. .
------ For reference only ------------------------------------- -
Thank you for sharing can send me a copy of 89770176@qq.com do not know if I can do image recognition it
------ For reference only --- ------------------------------------
no points , thanks for the landlord , moon_1008 @ sina. com
------ For reference only ------------------------------------- -
LZ, you are a good man , 469236041@qq.com
------ For reference only ------------------- --------------------
bs to score
------ For reference only ----------- ----------------------------
landlord , jadyer@yeah.net, thank you ! ! ! ! ! ! ! ! ! ! ! ! ! !
------ For reference only -------------------------------------- -


You can send mail , sent to you within 48 hours the source code and comments, as well as demo
------ For reference only -------------- -------------------------
it looked good , learn about ~ allango110000@gmail.com, landlord good life of peace ! !
------ For reference only -------------------------------------- -
seeking to learn
------ For reference only -------------------------------- -------
lqh3672@yahoo.com.cn
------ For reference only --------------------- ------------------
1411152770@qq.com
------ For reference only ------------ ---------------------------
because of the recent things more. To the various codes are really more than a friend . If not waited in vain , if tainted hair , you can spend points to download :
http://download.csdn.net/detail/yjflinchong/4232770

Thank you.
------ For reference only ------------------------------------ ---
  The reply was deleted at 2012-04-18 14:07:21 moderator

------ For reference only ---------------------------------- -----
qf.jhz.186 @ 126.com

------ For reference only ---------------------------------- -----
yaoqj@ufida.com

Thank you for sharing!
------ For reference only -------------------------------------- -
lxl467344991@163.com
you know
------ For reference only ------------------------------- --------
qiaoliwei@cking.com
------ For reference only ---------------------- -----------------
lzp_lrp@sohu.com

Thank
------ For reference only --------------------------------- ------
  The reply was deleted at 2012-04-18 12:45:09 moderator

------ For reference only ---------------------------------- -----
t_kong2010@163.com
good things should be shared ah .... Thank lz
------ For reference only ----------------------- ----------------
mn960mn@163.com
Thank you, landlord

------ For reference only ---------------------------------- -----
Thank you, landlord bit like the feeling into the CR Forum 457319664@qq.com, so harmonious , are grateful !
------ For reference only ---- -----------------------------------
250830758@qq.com LZ understand the way get points ~ ~
------ For reference only ---------------------------------- -----
zgwlb2000@163.com
Thank you, landlord !
------ For reference only -------------------------------------- -
liuyangboo@163.com Thank you, landlord dedication !
------ For reference only -------------------------------------- -
fds2003@163.com Thank
------ For reference only --------------------------- ------------
kangxinalex@126.com
Thank you, landlord !
------ For reference only -------------------------------------- -
5847713@qq.com

good life of peace !
------ For reference only -------------------------------------- -
zhuyujian916@163.com Thank you, landlord ! ! !
------ For reference only -------------------------------------- -
landlord, you can send me copies of the source code , I CSDN enough points , thank you !
mingxunzh601@gmail.com
------ For reference only ----------------------------- ----------
learn about, thank you landlord


lzfstruggle@163.com
------ For reference only ----------------------------- ----------
landlord mighty ! !
chenmaojun1180@126.com
------ For reference only ----------------------------- ----------
fujunlele@163.com seeking a source to see
------ For reference only ------ ---------------------------------
learn about, thank you landlord

xueliang814@21cn.com

没有评论:

发表评论