Skip to content

Commit 9eeaeb2

Browse files
committed
[DIP] Add image processing correctness test.
1 parent cfb5794 commit 9eeaeb2

File tree

5 files changed

+27
-44
lines changed

5 files changed

+27
-44
lines changed

utils/README.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

validation/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Python virtual environment
2+
/*venv
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Python virtual environment
2+
/*venv

utils/compareImg.py renamed to validation/ImageProcessing/compareImg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
img1_dim = len(np.array(img1).shape)
1414
img2_dim = len(np.array(img2).shape)
1515
if img1_dim != img2_dim:
16-
print("Please provide images of the same type. Currently, one is a grayscale image and the other is a color image.")
16+
print("Please provide images of the same type.")
1717

1818
# compare picture sizes
1919
if img1.size != img2.size:

validation/README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Correctness Checking Framework
22

3-
## Python based correctness checking
3+
## [DAP] Python based correctness checking for audio processing
44

5-
## Environment Setup
5+
### Environment Setup
66

77
Please build the "AudioValidationLib" target in CMake.
88
It would generate a dynamic library for CFFI to use.
@@ -37,3 +37,23 @@ There is no strict rule for adding a test case.
3737
The test case should be a python file with a class inherited from AudioTest.
3838
You would need to modify CWrapper.cpp to add new function wrappers for the new test case.
3939
The class should have a method named "run" which will be invoked by the main.py.
40+
41+
## [DIP] Python based correctness checking for image processing
42+
43+
### Environment Setup
44+
```
45+
$ cd ImageProcessing
46+
$ python -m venv EquivalenceTest.venv
47+
$ source EquivalenceTest.venv/bin/activate
48+
$ pip install pillow
49+
$ pip install numpy
50+
$ pip install sys
51+
$ deactivate
52+
```
53+
54+
### Execution
55+
```
56+
$ source EquivalenceTest.venv/bin/activate
57+
$ python compareImg.py <PATH/TO/Image1> <PATH/TO/Image2>
58+
$ deactivate
59+
```

0 commit comments

Comments
 (0)