Browse Source

Merge pull request #3964 from asmorkalov:as/threshold_otsu_fix

Fixed out-of-bound access in CUDA Otsu threshold implementation.
master 4.12.0
Alexander Smorkalov 2 weeks ago committed by GitHub
parent
commit
d943e1d61c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      modules/cudaarithm/src/cuda/threshold.cu

2
modules/cudaarithm/src/cuda/threshold.cu

@ -178,7 +178,7 @@ otsu_score(uint *otsu_threshold, uint *threshold_sums, float2 *variance) @@ -178,7 +178,7 @@ otsu_score(uint *otsu_threshold, uint *threshold_sums, float2 *variance)
{
const uint32_t n_thresholds = 256;
__shared__ float shared_memory[n_thresholds / WARP_SIZE];
__shared__ float shared_memory[n_thresholds];
int threshold = threadIdx.x;

Loading…
Cancel
Save