Research Article

Detecting Direction of Pepper Stem by Using CUDA-Based Accelerated Hybrid Intuitionistic Fuzzy Edge Detection and ANN

Algorithm 2

Code block of second and third kernel HIFED by using Otsu thresholding value.
size_t size=Height*Width*sizeof(float);
cudaMalloc((void **) &D_OrjImage  , size);
cudaMalloc((void **) &D_EdgedImage, size);
cudaMemcpy(D_OrjImage, H_OrjImage, size, cudaMemcpyHostToDevice);
cudaMemset(D_EdgedImage,1,size);
BS=1;
dim3 blockSize(BS, BS);
dim3 grid(Height/BS, Width/BS);
IntFuzzification<<< grid, blockSize >>> (D_OrjImage, D_EdgedImage, Height, Width);
IntDeFuzzification <<< grid, blockSize >>> (D_EdgedImage, Width, Height, OtsuThresholdingValue);