Skip to content

Commit

Permalink
tested and tests for imgavg function
Browse files Browse the repository at this point in the history
  • Loading branch information
drcandacemakedamoore committed May 16, 2021
1 parent 5284dd6 commit 853dece
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cleanX.py
Original file line number Diff line number Diff line change
Expand Up @@ -1358,8 +1358,8 @@ def avg_image_maker(set_of_images):

for example in set_of_images:
example = cv2.imread(example, cv2.IMREAD_GRAYSCALE)
ht = image.shape[0]
wt = image.shape[1]
ht = example.shape[0]
wt = example.shape[1]
list_h.append(ht)
list_w.append(wt)

Expand Down
10 changes: 9 additions & 1 deletion test/test_cleanx.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,12 @@ def test_def_make_contour_image():
picy1 = vovo
defMkcont = cleanX.make_contour_image(picy1)
assert len(defMkcont) > 0



def test_avg_image_maker():
#set_of_images = glob.glob(*.jpg)
test_dfE = (os.path.join(image_directory,'test_sample_df.csv'))
test_df = pd.read_csv(test_dfE)
set_of_images = image_directory + '/' + test_df.image_path.dropna()
tab = cleanX.avg_image_maker(set_of_images)
assert tab.shape[0] > 2

0 comments on commit 853dece

Please sign in to comment.