Wednesday, May 15, 2013

Lab Notes 5/15/2013 (WEEK 7 LAB)

Started with a conference with the TA, this week is still forced on the k-means.
(* Friday 2 PM's group meeting has been determined.)

Test process:
1) edge -> filter ->filter-> resize-> reshape(create matrix) -> list things -> kmeans
2) make the image smaller, or kmeans won't be able to work it out.
Noticed that the Matlab's built-in function " blockproc" is able to change the color and so on deal with the "too big sized " image.
Sample using the function:
http://blogs.mathworks.com/steve/2011/08/16/dealing-with-really-big-images-block-processing/

Sample Solution :

my_fun= @(block_struct) I filter(block_struct.data, h) ;
bodersize=[ 2 2];
Original_file_name = 'mmm';
Derp_file_name= 'nnnnn';
blockproc(Original_file_name, block_size, my_fun,...'BoderSize', bodersize, 'Destination', Derp_file_name);
imshow(Derp_file_name);

3) by using kmeans, plot things that are not equal to 2.

4) after creating a for loop to count the values, errors occur;

Testing and Solution: (with Dr. Anu)

*   list1=[rs1/max(rs1),rs2];  % not working
*   list1=[rs_1, rs2];            % not working
     list1=[re_1,unit8(rs2)];    % worked
                       *kmean(list1, 3);      % not working
                         double(list1);          % worked
                                     * kmeans(list1,3);    % not working
                                     * kmeans(list1, 2);    %not working
                                       kmeans(list1, 1);     % worked
                                                 
* count(find( rs_1 ==1);    % not working
size( find ( rs_1 == 1 ) );     % worked
size( find ( rs2 == 1 ) );     %worked    
*kmean(list1,3,'emptyaction', 'drop');         % not working
*kmean(list1,3,'emptyaction', 'singleton');  % not working
*kmean(list1,2,'emptyaction', 'singleton');   % not working

% recheck the original codes

have to plug in the centroids and figure out the rest ...

No comments:

Post a Comment