-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
1,412 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# test directories | ||
__tests__ | ||
test | ||
tests | ||
powered-test | ||
|
||
# asset directories | ||
docs | ||
doc | ||
website | ||
images | ||
#assets | ||
|
||
# examples | ||
example | ||
examples | ||
|
||
# code coverage directories | ||
coverage | ||
.nyc_output | ||
|
||
# build scripts | ||
Makefile | ||
Gulpfile.js | ||
Gruntfile.js | ||
|
||
# configs | ||
appveyor.yml | ||
circle.yml | ||
codeship-services.yml | ||
codeship-steps.yml | ||
wercker.yml | ||
.tern-project | ||
.gitattributes | ||
.editorconfig | ||
.*ignore | ||
.eslintrc | ||
.jshintrc | ||
.flowconfig | ||
.documentup.json | ||
.yarn-metadata.json | ||
.travis.yml | ||
|
||
# misc | ||
*.md |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
{ | ||
"name": "my-ocr", | ||
"productName": "MY-OCR", | ||
"version": "1.0.0", | ||
"version": "1.0.3", | ||
"private": true, | ||
"main": "dist-electron/main/index.js", | ||
"type": "module", | ||
"homepage": ".", | ||
"author": "liumingye <[email protected]>", | ||
"debug": { | ||
"env": { | ||
"VITE_DEV_SERVER_URL": "http://127.0.0.1:3000/" | ||
|
@@ -59,5 +60,6 @@ | |
}, | ||
"resolutions": { | ||
"jackspeak": "2.1.1" | ||
} | ||
}, | ||
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__all__ = ['transform','rectify','imgEnhance'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from PIL import ImageEnhance | ||
import numpy as np | ||
import cv2 | ||
|
||
class Enhancer: | ||
def bright(self, image, brightness): | ||
enh_bri = ImageEnhance.Brightness(image) | ||
brightness = brightness | ||
imageBrightend = enh_bri.enhance(brightness) | ||
return imageBrightend | ||
|
||
def color(self, image, color): | ||
enh_col = ImageEnhance.Color(image) | ||
color = color | ||
imageColored = enh_col.enhance(color) | ||
return imageColored | ||
|
||
def contrast(self, image, contrast): | ||
enh_con = ImageEnhance.Contrast(image) | ||
contrast = contrast | ||
image_contrasted = enh_con.enhance(contrast) | ||
return image_contrasted | ||
|
||
def sharp(self, image, sharpness): | ||
enh_sha = ImageEnhance.Sharpness(image) | ||
sharpness = sharpness | ||
image_sharped = enh_sha.enhance(sharpness) | ||
return image_sharped | ||
|
||
def gamma(self, image, gamma): | ||
# gamma_table = [np.power(x / 255.0, gamma) * 255.0 for x in range(256)] | ||
# gamma_table = np.round(np.array(gamma_table)).astype(np.uint8) | ||
# return cv2.LUT(image, gamma_table) | ||
gamma_image = np.power(image / float(np.max(image)), gamma) | ||
return gamma_image |
Oops, something went wrong.