We need to add into our solution a library class project for watershed image process. We provide you the Matlab code that we want to have in C# implemented.
## Deliverables
The requirements are:
- Create a Visual Studio 2008 library class project.
- Follow Matlab code.
Matlab code:
**%% example function**
function separate_cells(image_path)
img = imread(image_path);
D=-bwdist(~img);
L=watershed(D);
[row, columns] = size(img);
for i=1:row
for j=1: columns
if L(i,j)==0
img(i,j)=0;
end
end
end
imwrite(img, '[login to view URL]');
Interface definition:
**Function:** Bitmap watershed(Bitmap image)
**Parameters:**
- ***image****: Image gived to be proccesed with the watershed algorithim*
**Behaviour:**
- *The function has to do watershed the image as matlab does.*
- *If everything is ok the result will be exactly as matlab and the returned image will be the watershed proccessed image.*
Deliverables:
**We will know that you have read this specs if you propose deadline with your bid.**
Deliverable will be a project written in C# language that compiles in .DLL library with Watershed class inside.
We will provide you of Matlab example code that we actually use. Also, we provide you of the original picture and the one watershed by Matlab. Furthermore, we provide you of an application to compare images called "BitAccurate". Your result image processed by C# must be exactly to the one processed by Matlab.
We test your solution, taking the image you will export and passing over BitAccurate app obtaining 100% of accuracy. You have to process [login to view URL] image and obtain correct_image.jpg.
For example if you compare [login to view URL] with [login to view URL] the accuracy is less than 90% so it's bad result for us, we need something like correct_image.jpg.
PS: We test .m script with Matlab R2011a.