-
Notifications
You must be signed in to change notification settings - Fork 183
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
1 parent
2ada455
commit ed5885d
Showing
48 changed files
with
22,349 additions
and
11 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
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,3 +1,4 @@ | ||
from .BlindWatermark import watermark | ||
from .ncc import NCC | ||
from .ncc import test_ncc | ||
from .ncc import test_ncc | ||
from .psnr import test_psnr |
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,16 @@ | ||
import cv2 | ||
import numpy as np | ||
|
||
|
||
def PSNR(img1, img2): | ||
mse = np.mean( (img1/255. - img2/255.) ** 2 ) | ||
if mse < 1.0e-10: | ||
return 100 | ||
PIXEL_MAX = 1 | ||
return 20 * np.log10(PIXEL_MAX / np.sqrt(mse)) | ||
|
||
def test_psnr(filename1,filename2): | ||
a = cv2.imread(filename1) | ||
b = cv2.imread(filename2) | ||
for i in range(3): | ||
print(PSNR(a[:,:,i],b[:,:,i])) |
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,58 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE Project SYSTEM "Project-5.1.dtd"> | ||
<!-- eric project file for project BlindWatermark --> | ||
<!-- Saved: 2019-07-24, 13:13:32 --> | ||
<!-- Copyright (C) 2019 , --> | ||
<Project version="5.1"> | ||
<Language>en_US</Language> | ||
<Hash>7bde8d649fd64b72d503b054eaf224a7b1a954e8</Hash> | ||
<ProgLanguage mixed="0">Python3</ProgLanguage> | ||
<ProjectType>PyQt5</ProjectType> | ||
<Version>0.1</Version> | ||
<Author></Author> | ||
<Email></Email> | ||
<Eol index="0"/> | ||
<Sources> | ||
<Source>Ui_about.py</Source> | ||
<Source>Ui_main_win.py</Source> | ||
<Source>Ui_tab.py</Source> | ||
<Source>__init__.py</Source> | ||
<Source>img/about_sources_rc.py</Source> | ||
<Source>img/sources_rc.py</Source> | ||
<Source>main_win.py</Source> | ||
<Source>tab.py</Source> | ||
</Sources> | ||
<Forms> | ||
<Form>about.ui</Form> | ||
<Form>main_win.ui</Form> | ||
<Form>tab.ui</Form> | ||
</Forms> | ||
<Resources> | ||
<Resource>img/about_sources.qrc</Resource> | ||
<Resource>img/sources.qrc</Resource> | ||
</Resources> | ||
<Vcs> | ||
<VcsType>None</VcsType> | ||
</Vcs> | ||
<FiletypeAssociations> | ||
<FiletypeAssociation pattern="*.e4p" type="OTHERS"/> | ||
<FiletypeAssociation pattern="*.idl" type="INTERFACES"/> | ||
<FiletypeAssociation pattern="*.md" type="OTHERS"/> | ||
<FiletypeAssociation pattern="*.proto" type="PROTOCOLS"/> | ||
<FiletypeAssociation pattern="*.py" type="SOURCES"/> | ||
<FiletypeAssociation pattern="*.py3" type="SOURCES"/> | ||
<FiletypeAssociation pattern="*.pyw" type="SOURCES"/> | ||
<FiletypeAssociation pattern="*.pyw3" type="SOURCES"/> | ||
<FiletypeAssociation pattern="*.qm" type="TRANSLATIONS"/> | ||
<FiletypeAssociation pattern="*.qrc" type="RESOURCES"/> | ||
<FiletypeAssociation pattern="*.rst" type="OTHERS"/> | ||
<FiletypeAssociation pattern="*.ts" type="TRANSLATIONS"/> | ||
<FiletypeAssociation pattern="*.txt" type="OTHERS"/> | ||
<FiletypeAssociation pattern="*.ui" type="FORMS"/> | ||
<FiletypeAssociation pattern="GNUmakefile" type="OTHERS"/> | ||
<FiletypeAssociation pattern="Makefile" type="OTHERS"/> | ||
<FiletypeAssociation pattern="README" type="OTHERS"/> | ||
<FiletypeAssociation pattern="README.*" type="OTHERS"/> | ||
<FiletypeAssociation pattern="makefile" type="OTHERS"/> | ||
</FiletypeAssociations> | ||
</Project> |
Oops, something went wrong.