diff --git "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/L.png" "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/L.png" index e8126edf..ec931580 100644 Binary files "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/L.png" and "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/L.png" differ diff --git "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219502.png" "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219502.png" new file mode 100644 index 00000000..dcdb50b8 Binary files /dev/null and "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219502.png" differ diff --git "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219536.png" "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219536.png" new file mode 100644 index 00000000..dcdb50b8 Binary files /dev/null and "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219536.png" differ diff --git "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219553.png" "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219553.png" new file mode 100644 index 00000000..3f433da0 Binary files /dev/null and "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219553.png" differ diff --git "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219554.png" "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219554.png" new file mode 100644 index 00000000..d725a44c Binary files /dev/null and "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219554.png" differ diff --git "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219726.png" "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219726.png" new file mode 100644 index 00000000..a3a1cdc7 Binary files /dev/null and "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219726.png" differ diff --git "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219763.png" "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219763.png" new file mode 100644 index 00000000..a3a1cdc7 Binary files /dev/null and "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219763.png" differ diff --git "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219780.png" "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219780.png" new file mode 100644 index 00000000..3f433da0 Binary files /dev/null and "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219780.png" differ diff --git "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219781.png" "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219781.png" new file mode 100644 index 00000000..d725a44c Binary files /dev/null and "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219781.png" differ diff --git "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219794.png" "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219794.png" new file mode 100644 index 00000000..3f433da0 Binary files /dev/null and "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219794.png" differ diff --git "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219795.png" "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219795.png" new file mode 100644 index 00000000..d725a44c Binary files /dev/null and "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219795.png" differ diff --git "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219822.png" "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219822.png" new file mode 100644 index 00000000..d725a44c Binary files /dev/null and "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219822.png" differ diff --git "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219894.png" "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219894.png" new file mode 100644 index 00000000..d725a44c Binary files /dev/null and "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/cat/1484219894.png" differ diff --git "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/recognise.py" "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/recognise.py" index cee1d8ed..9d09418d 100644 --- "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/recognise.py" +++ "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/recognise.py" @@ -79,7 +79,7 @@ def magnitude(self,concordance): else: total += count ** 2 except Exception,e: - print type(total),total,type(count),count + #print type(total),total,type(count),count print e return math.sqrt(total) @@ -89,9 +89,13 @@ def relation(self,concordance1, concordance2): topvalue = 0 for word, count in concordance1.items(): if word in concordance2: - print type(topvalue),topvalue,count,concordance2[word] - time.sleep(1) - topvalue += count * concordance2[word][0] + #print type(topvalue),topvalue,count,concordance2[word] + #time.sleep(1) + if(type(concordance2[word]) == type(())): + topvalue += count * concordance2[word][0] + #print type(total),total,type(count),count ** 2 + else: + topvalue += count * concordance2[word] #time.sleep(10) return topvalue / (self.magnitude(concordance1) * self.magnitude(concordance2)) @@ -127,7 +131,7 @@ def recognise(self,image): name = os.path.join(root,file) name_list.append(name) - print name_list + #print name_list for i in name_list: #name = '11' name = i @@ -137,8 +141,8 @@ def recognise(self,image): # 设置图片路径 image=Image.open(name) #image=Image.open('./temp/2.png') - print image.mode + #print image.mode result=imageRecognize.recognise(image) string=[''.join(item[1]) for item in result] print(string) - break + #break diff --git "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/temp/1.png" "b/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/temp/1.png" deleted file mode 100644 index 701cec1e..00000000 Binary files "a/1.\351\252\214\350\257\201\347\240\201/num\345\211\257\346\234\254/temp/1.png" and /dev/null differ