c# - K-Nearest Neighbor in Image Recognition -


i researching projects or guide/tutorial research. have determine 3 leaf different species , using 100 samples each(300 specific), professor requires me imply k-nearest neighbor algorithm in classifying uploaded image in system using 100 samples uploaded in database reference.

i have done uploading of samples , image processing system, still have apply knn algorithm in classifying them, suggestions or step-by-step tutorials?

is there need study in coding algorithm or there existing libraries applying knn in image classifying in c# language? , having 100 image samples each leaf specie enough?

more info.: reply martijin_himself's answer

yes, talking tree leaves. well, problem is, feature consider tree leaf's shape. neglecting other features such color, size,..etc. , don't know when or how extract these "feature vectors", put them , how image samples used reference leaf classified

about image processing part of system, image undergoes process of binarization, , blobbing, having image consider it's shape feature. so, same goes samples uploaded in database. sorry if lack information/s needed answers. please bear me.

thanks in advance! :)

if understand correctly, have training set of 300 images, 100 each class (or label).

first, have define feature vector, set of image characteristics or attributes think important in classifying images. if talking (tree) leaves, 1 characteristic may colour values in image?

the second step define distance function calculates distance between feature vectors. image lot of red have bigger distance image lot of green, example. weigh features reflect importance in contribution distance.

next, can choose value of k, , test how combination of feature vector , distance function performs classify images known labels training set. called cross-validation. if feature vector , distance function not perform well, may have chosen attributes not representative class (such size of image).

when implementing in c#, create featurevector class each image or that, , maybe implement icomparable (or similar) interface calculate distance function known sample. can create list , sort it. suggestion.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -