96e5c12dc5a3a082cbd52fb8164da31318e0201e,skimage/feature/_hog.py,,hog,#Any#Any#Any#Any#Any#Any#Any#Any#Any#,53
Before Change
image = image.astype("float")
if len(image.shape) == 3:
channel_gradients = []
gradient = np.zeros(image.shape)
for dimension in range(image.shape[2]):
gx, gy = compute_image_gradients(image[:, :, dimension])
gradient[:, :, dimension] = np.hypot(gx, gy)
channel_gradients.append((gx, gy))
gx = np.empty(image.shape[0:2], dtype=np.double)
gy = np.empty(image.shape[0:2], dtype=np.double)
max_index_array = gradient.argmax(axis = 2)
for row_index, row in enumerate(max_index_array):
for col_index, value in enumerate(row):
gx[row_index][col_index] = channel_gradients[value][0][row_index][col_index]
gy[row_index][col_index] = channel_gradients[value][1][row_index][col_index]
else:
gx, gy = compute_image_gradients(image)
After Change
gradient_magnitude[:, :, dimension] = np.hypot(x_gradient[:, :, dimension], y_gradient[:, :, dimension])
max_index_array = gradient_magnitude.argmax(axis=2)
rr, cc = np.meshgrid(np.arange(image.shape[0]), np.arange(image.shape[1]))
gx = x_gradient[rr, cc, max_index_array]
gy = y_gradient[rr, cc, max_index_array]
else:
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 8
Instances
Project Name: scikit-image/scikit-image
Commit Name: 96e5c12dc5a3a082cbd52fb8164da31318e0201e
Time: 2017-11-14
Author: pradyumnanpk@gmail.com
File Name: skimage/feature/_hog.py
Class Name:
Method Name: hog
Project Name: scikit-learn-contrib/DESlib
Commit Name: bba1901f835525551dde9ec1537d041abc88d293
Time: 2021-04-08
Author: rafaelmenelau@gmail.com
File Name: deslib/static/oracle.py
Class Name: Oracle
Method Name: predict
Project Name: idaholab/raven
Commit Name: 438b2a63d195c8f5ccecae35d577d8bfde354406
Time: 2020-08-22
Author: mohammad.abdo@inl.gov
File Name: framework/Optimizers/GeneticAlgorithm.py
Class Name: GeneticAlgorithm
Method Name: _useRealization
Project Name: hpclab/rankeval
Commit Name: 8d4fee5d7dc69f82aadb38abc4564dda5cc8580f
Time: 2017-06-14
Author: cristina.i.muntean@gmail.com
File Name: rankeval/core/metrics/rbp.py
Class Name: RBP
Method Name: eval_per_query