|
• need help in coding with matlab
hello all. I realy need help in coding with matlab. I try to built an object recognation with ANN and i need some value for the input node. the problem is I don't know how to extract it. here are some of my problem :
1. how can I get the RGB value from one pixel. and I want to get the each of value ( each value of R,G and B)
2. how can I change the color of pixel in image? my image was using a solid white background. and now I want to make change like this :
"all pixel with white color change to black and all pixel that not white color change to white". i use code like this but it failed
for c =1: 480000
if b (c) > 250
b(c) = 0;
else
b(c) = 255;
end
end;
3. As you can see in my code above I use an single looping. how can I change this code into matlab code
for i = 1 to 800
for j = 1 to 600
if b [i][j] > 250
b[i][j] = 0;
else
b [i][j] = 255;
in other word I want to know how to access array row and column in matlab.
thanks very much. sorry if my post is extremly long, but I'm desperate in need of help
|