-
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.
solved quantization and found issues with generate lookup table and w…
…rong dimensions for position table and grayscale table
- Loading branch information
1 parent
e35ecba
commit fc71471
Showing
5 changed files
with
130 additions
and
70 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
,r0745164,pc-klas1-5.esat.kuleuven.be,12.12.2023 15:38,file:///users/students/r0745164/.config/libreoffice/4; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import numpy as np | ||
|
||
D_b=4 | ||
final_HDC_centroid = np.arange(-100, 21) | ||
final_HDC_centroid_q = np.zeros(len(final_HDC_centroid)) | ||
|
||
max_centroid = np.max(np.abs(final_HDC_centroid)) | ||
min_centroid = np.min(np.abs(final_HDC_centroid)) | ||
|
||
#if (final_HDC_centroid[x] >= 0): fact = (2**(D_b-1)-1)/max_centroid | ||
#else: fact = (2**(D_b-1))/max_centroid | ||
final_HDC_centroid_q = np.round(final_HDC_centroid*(2**(D_b-1)-1)/max_centroid) | ||
|
||
|
||
''' | ||
for x in range(len(final_HDC_centroid)): | ||
if (final_HDC_centroid[x] >= 0): final_HDC_centroid_q[x] = (final_HDC_centroid[x]-min_centroid)*((2**(D_b-1)-1)/(max_centroid-min_centroid)) | ||
else: final_HDC_centroid_q[x] = -(max_centroid - final_HDC_centroid[x])*((2**(D_b-1))/(max_centroid-min_centroid)) | ||
''' | ||
print(final_HDC_centroid_q) |