cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
Functions | |
def | gammaCorrection (src, gamma) |
Variables | |
debug_level = logging.DEBUG | |
stream | |
stdout | |
level | |
int | REPEATS = 5 |
list | kernels |
frame = cv.imread(cv.samples.findFile("CARLA.jpg")) | |
orig_frame = cv.cvtColor(frame, cv.COLOR_RGB2GRAY) | |
toc_capture = time.perf_counter() | |
list | elapsed_times = [[0 for j in range(REPEATS)] for i in range(len(kernels))] |
list | results = [[0 for j in range(REPEATS)] for i in range(len(kernels))] |
start_time = time.time() | |
int | blockSize = 2 |
int | ksize = 3 |
float | freeParameter = 0.04 |
tmp = frame | |
list | channels = [0] |
mask = None | |
list | histSize = [256] |
list | ranges = [0,256] |
hist = cv.calcHist(tmp, channels, mask, histSize, ranges) | |
int | t_lower = 50 |
int | t_upper = 150 |
canny = cv.Canny(frame, t_lower, t_upper) | |
lines = cv.HoughLines(canny, 1, np.pi / 180, 150, None, 0, 0) | |
x = cv.Sobel(frame, cv.CV_64F, 1, 0, ksize=5) | |
y = cv.Sobel(frame, cv.CV_64F, 0, 1, ksize=5) | |
absx = cv.convertScaleAbs(x) | |
absy = cv.convertScaleAbs(y) | |
ddepth = cv.CV_16S | |
int | kernel_size = 5 |
source | |
destination | |
grid_x | |
grid_y | |
grid_z = griddata(destination, source, (grid_x, grid_y), method='cubic') | |
map_x = np.append([], [ar[:,1] for ar in grid_z]).reshape(784,784) | |
map_y = np.append([], [ar[:,0] for ar in grid_z]).reshape(784,784) | |
map_x_32 = map_x.astype('float32') | |
map_y_32 = map_y.astype('float32') | |
rows | |
cols | |
input_pts = np.float32([[0,0], [cols-1,0], [0,rows-1]]) | |
output_pts = np.float32([[cols-1,0], [0,0], [cols-1,rows-1]]) | |
M = cv.getAffineTransform(input_pts , output_pts) | |
hog = cv.HOGDescriptor() | |
h = hog.compute(frame) | |
end_time = time.time() | |
string | image_name = "CARLA_out_kernel_" + kernels[i] + ".jpg" |
int | average_elapsed_time = sum(elapsed_times) / REPEATS |
df = pd.DataFrame(elapsed_times) | |
ax = sns.boxplot(data=df) | |
loc | |
axis | |
labelrotation | |
fontsize | |
x1 | |
y1 | |
x2 | |
y2 | |
def test_harris_standalone.gammaCorrection | ( | src, | |
gamma | |||
) |
Definition at line 63 of file test_harris_standalone.py.
test_harris_standalone.absx = cv.convertScaleAbs(x) |
Definition at line 129 of file test_harris_standalone.py.
test_harris_standalone.absy = cv.convertScaleAbs(y) |
Definition at line 130 of file test_harris_standalone.py.
int test_harris_standalone.average_elapsed_time = sum(elapsed_times) / REPEATS |
Definition at line 203 of file test_harris_standalone.py.
Definition at line 215 of file test_harris_standalone.py.
test_harris_standalone.axis |
Definition at line 218 of file test_harris_standalone.py.
int test_harris_standalone.blockSize = 2 |
Definition at line 94 of file test_harris_standalone.py.
Definition at line 118 of file test_harris_standalone.py.
list test_harris_standalone.channels = [0] |
Definition at line 106 of file test_harris_standalone.py.
test_harris_standalone.cols |
Definition at line 167 of file test_harris_standalone.py.
test_harris_standalone.ddepth = cv.CV_16S |
Definition at line 135 of file test_harris_standalone.py.
test_harris_standalone.debug_level = logging.DEBUG |
Definition at line 47 of file test_harris_standalone.py.
test_harris_standalone.destination |
Definition at line 149 of file test_harris_standalone.py.
test_harris_standalone.df = pd.DataFrame(elapsed_times) |
Definition at line 213 of file test_harris_standalone.py.
Definition at line 80 of file test_harris_standalone.py.
test_harris_standalone.end_time = time.time() |
Definition at line 194 of file test_harris_standalone.py.
test_harris_standalone.fontsize |
Definition at line 220 of file test_harris_standalone.py.
test_harris_standalone.frame = cv.imread(cv.samples.findFile("CARLA.jpg")) |
Definition at line 55 of file test_harris_standalone.py.
float test_harris_standalone.freeParameter = 0.04 |
Definition at line 96 of file test_harris_standalone.py.
test_harris_standalone.grid_x |
Definition at line 159 of file test_harris_standalone.py.
test_harris_standalone.grid_y |
Definition at line 159 of file test_harris_standalone.py.
test_harris_standalone.grid_z = griddata(destination, source, (grid_x, grid_y), method='cubic') |
Definition at line 160 of file test_harris_standalone.py.
test_harris_standalone.h = hog.compute(frame) |
Definition at line 191 of file test_harris_standalone.py.
Definition at line 111 of file test_harris_standalone.py.
list test_harris_standalone.histSize = [256] |
Definition at line 108 of file test_harris_standalone.py.
test_harris_standalone.hog = cv.HOGDescriptor() |
Definition at line 190 of file test_harris_standalone.py.
string test_harris_standalone.image_name = "CARLA_out_kernel_" + kernels[i] + ".jpg" |
Definition at line 198 of file test_harris_standalone.py.
Definition at line 177 of file test_harris_standalone.py.
int test_harris_standalone.kernel_size = 5 |
Definition at line 136 of file test_harris_standalone.py.
list test_harris_standalone.kernels |
Definition at line 51 of file test_harris_standalone.py.
test_harris_standalone.ksize = 3 |
Definition at line 95 of file test_harris_standalone.py.
test_harris_standalone.labelrotation |
Definition at line 218 of file test_harris_standalone.py.
test_harris_standalone.level |
Definition at line 48 of file test_harris_standalone.py.
test_harris_standalone.lines = cv.HoughLines(canny, 1, np.pi / 180, 150, None, 0, 0) |
Definition at line 121 of file test_harris_standalone.py.
test_harris_standalone.loc |
Definition at line 217 of file test_harris_standalone.py.
test_harris_standalone.M = cv.getAffineTransform(input_pts , output_pts) |
Definition at line 186 of file test_harris_standalone.py.
test_harris_standalone.map_x = np.append([], [ar[:,1] for ar in grid_z]).reshape(784,784) |
Definition at line 161 of file test_harris_standalone.py.
test_harris_standalone.map_x_32 = map_x.astype('float32') |
Definition at line 163 of file test_harris_standalone.py.
test_harris_standalone.map_y = np.append([], [ar[:,0] for ar in grid_z]).reshape(784,784) |
Definition at line 162 of file test_harris_standalone.py.
test_harris_standalone.map_y_32 = map_y.astype('float32') |
Definition at line 164 of file test_harris_standalone.py.
test_harris_standalone.mask = None |
Definition at line 107 of file test_harris_standalone.py.
test_harris_standalone.orig_frame = cv.cvtColor(frame, cv.COLOR_RGB2GRAY) |
Definition at line 59 of file test_harris_standalone.py.
Definition at line 178 of file test_harris_standalone.py.
list test_harris_standalone.ranges = [0,256] |
Definition at line 109 of file test_harris_standalone.py.
int test_harris_standalone.REPEATS = 5 |
Definition at line 50 of file test_harris_standalone.py.
Definition at line 81 of file test_harris_standalone.py.
test_harris_standalone.rows |
Definition at line 167 of file test_harris_standalone.py.
test_harris_standalone.source |
Definition at line 139 of file test_harris_standalone.py.
test_harris_standalone.start_time = time.time() |
Definition at line 87 of file test_harris_standalone.py.
test_harris_standalone.stdout |
Definition at line 48 of file test_harris_standalone.py.
test_harris_standalone.stream |
Definition at line 48 of file test_harris_standalone.py.
int test_harris_standalone.t_lower = 50 |
Definition at line 115 of file test_harris_standalone.py.
int test_harris_standalone.t_upper = 150 |
Definition at line 116 of file test_harris_standalone.py.
list test_harris_standalone.tmp = frame |
Definition at line 101 of file test_harris_standalone.py.
test_harris_standalone.toc_capture = time.perf_counter() |
Definition at line 76 of file test_harris_standalone.py.
Definition at line 127 of file test_harris_standalone.py.
test_harris_standalone.x1 |
Definition at line 230 of file test_harris_standalone.py.
test_harris_standalone.x2 |
Definition at line 230 of file test_harris_standalone.py.
Definition at line 128 of file test_harris_standalone.py.
test_harris_standalone.y1 |
Definition at line 230 of file test_harris_standalone.py.
test_harris_standalone.y2 |
Definition at line 230 of file test_harris_standalone.py.