2013年11月2日星期六

java fingerprint + Google image recognition technology to share out ======= source to achieve === ===

java fingerprint + Google image recognition technology

while back in Ruan Yifeng 's blog saw this " Similar Image Search Theory" blog , there is an impulse to implement these principles out.


wrote a demo 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 with all its similar images .

Open Google Image Search page :


Click to use the Upload a angelababy picture :


click on the search , Google will identify with similar images , pictures more the higher the similarity the 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 interpretation similar picture search elements to achieve key technology called "perception hash algorithm " (Perceptualhash algorithm), it is the role for each picture to generate a "fingerprint" (fingerprint) string, and then compare the different pictures of fingerprints. Results closer , it shows more similar images .



The following is a simple Java implementation :



pretreatment : Read Image


first step, the reduced size .

the picture down to the size of 8x8 , a total of 64 pixels. The role of this step is to remove the picture of the details , leaving only the structure , shading and other basic information , get rid of different size, scale images to bring the difference .


The second step, simplified colors.

will shrink after the picture , turn 64 shades of gray. That is, all pixels of a total of only 64 colors .


The third step is to calculate the average.

calculated for all 64 pixel gray average.


fourth step, comparing pixel gray .

gray level of each pixel , compared with 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.

comparison of the previous step , together, to form a 64-bit integer , which is the fingerprint of this picture . Mix order is not important, as long as the guarantee that all pictures are using the same order on the line.


get fingerprints later, you can compare different pictures to see 64 how many bits are not the same. In theory, this is equivalent to computing " 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 pictures similar .



advantage of this algorithm is simple and quick , without scaling of image size , the disadvantage is the picture content is not 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 can identify the picture distortion. As long as the deformation does not exceed 25% , they can match the original . Although these algorithms are more complicated , but the principle is simple with the above algorithm is the same as the first picture is transformed into Hash string , and then compared.


Most of the content above website directly from Ruan Yifeng copied , 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 to me to see 279417447@qq.cpm
------ Solution --------------------- -----------------------
showsen.com @ 163.com
Thank
------ Solution ----------------------------------- ---------
I have a yard ! duanpan916@yahoo.cn
------ Solution ----------------------------------- ---------

program should have a yard ape ! szy3121@163.com

------ Solution ------------------------------------ --------
578646730@qq.com
------ Solution ------------------------ --------------------
a code is king . chenw323@163.com
Thank landlord
------ Solution ---------------------------------- ----------
fwsong1@163.com
thank you for sharing ~ ~ ~ ~ ~
------ Solution ---------------------------- ----------------
380316176@qq.com
Thank 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 good landlord
------ Solution -------------------------- ------------------
mighty .
------ For reference only -------------------------------------- -
  This reply was moderator deleted at 2012-04-17 16:53:00

------ 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 with 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 the example4.jpg
Hamming distance : 0 source.jpg the same picture with the example5.jpg
Hamming distance : 2 source.jpg picture is very similar with example6.jpg

------ For reference only ---------------------------------- -----
effect can also be yet.
------ For reference only ------------------------------------ ---


Reply Mail a friend

I try to source package sent to you mailbox


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


you have code ? heard from everyone that loves Uncensored it
------ For reference only -------------------------- -------------
LZ hard
lltthh@yeah.net
------ For reference only ----------------------------- ----------
472852263@qq.com
I have a code , but also annotated . . !
allowed to criticize greedy ah. . .
------ For reference only -------------------------------------- -
spirit is 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 of !
------ For reference only -------------------------------------- -
long410381@126.com
------ For reference only ----------------------------- ----------


is a bit greedy . However code . Comments have . test images 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 with 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 the example4.jpg
Hamming distance : 0 source.jpg the same picture with the example5.jpg
Hamming distance : 2 source.jpg pictures with example6.jpg very similar
------ For reference only ------------------ ---------------------
iwxobbs@163.com grateful to 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 ----- ----------------------------------
bunkers
------ 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

Thank you to share .
------ For reference only -------------------------------------- -
liuzheng4626846@vip.qq.com

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

LZ, hard ! !
------ For reference only -------------------------------------- -
LZ there is no similar set of fingerprint images yet. Fingerprint test to see how effective it .
------ For reference only -------------------------------------- -
not wishlists do ? ? ?
------ For reference only -------------------------------------- -
want to see results, send one to me , thank you !
a123456789bingxiao@126.com
------ For reference only ----------------------------- ----------
perception hash algorithm
------ For reference only --------------------- ------------------
601820665@qq.com
Thank you to share
------ 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 true v5 top one .. .
------ For reference only ------------------------------------- -
Thank you to share can send me a copy 89770176@qq.com do not know can not 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 be divided
------ For reference only ----------- ----------------------------
landlord , jadyer@yeah.net, thank you ! ! ! ! ! ! ! ! ! ! ! ! ! !
------ For reference only -------------------------------------- -


You can send mail , sent to you within 48 hours of the source code and comments , as well as demo
------ For reference only -------------- -------------------------
looked good Mody, 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 various codes of friends too much. If you do 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 ------------------------------------ ---
  This reply was moderator deleted at 2012-04-18 14:07:21

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

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

Thank you to share !
------ 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 --------------------------------- ------
  This reply was moderator deleted at 2012-04-18 12:45:09

------ For reference only ---------------------------------- -----
t_kong2010@163.com
good things should share ah .... thank lz
------ For reference only ----------------------- ----------------
mn960mn@163.com
Thank landlord

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

good life of peace !
------ For reference only -------------------------------------- -
zhuyujian916@163.com Thank landlord ! ! !
------ For reference only -------------------------------------- -
landlord can send me the source were you, 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

没有评论:

发表评论