Implementation of Chan-Vese Algorithm for the segmentation of images of foreground and background using CUDA on Nvidia GPU.
Requirements: .NET Framework 4.6(Reccomended)
To Run (CUDA 9.0 required)
Launch ImageConverter.exe in Imageconvertor
-
Open the Original Image on the left panel(Instead of typing the width and height manually)
-
Press Genenrate to get the grayscale input for the code(optional). Will generate a data.txt and size.txt in the selected folder. You can view the grayscale image by loading the data file in the right pane.
-
After generating the data.txt and size.txt use it to run the code in the lab machine. Get the output files and view it using the GUI app.
4.Open the output file generated by the GPU machine code in the right pane. Wait for a while to see that the Get image button is active. This is applicable for larger images.
- Click on Get Image to get the contour image.(If the file is not the same as that of the image wrong output will be shown)
To run on gpulab machine
-
Take the data.txt and size.txt from the GUI app and put in the code main folder.
-
make and run chanvese. Console will print gpu and cpu runtimes.
-
Copy back out_gpu.txt and out_seq.txt to view the output.
Code To view code open solution in Visual Studio 2015(version preferred may work in other versions).