Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 3

Error in cd(image_folder(folders).name);

In this project, the link is given

https://github.com/Lakshya-Kejriwal/Fruit-classification

for the file, save_segment_images.m        Llink is as follows

https://github.com/Lakshya-Kejriwal/Fruit-classification/blob/master/save_segment_images.m

 

I am getting error on line 14 i.e. cd(image_folder(folders).name);

 

so I written the fullfile path. i.e 

cd(fullfile('C:/Program Files/MATLAB/MATLAB Production Server/R2015a/bin/Fruit-classification-master/segmented_images',image_folder(folders).name));

So now no error and it is aceessing the file. but on line 15 when i am debugging code idx value is emply.

and it is not entering into for loop on line 15. so no segmentation is done for any image.  Dont know why it is happening.

I am using matlab R2015a. 

 

2 Replies
Highlighted
Pilot Lvl 3
Message 2 of 3

Re: Error in cd(image_folder(folders).name);

I've never used matlab, but looking at the file in question, I think you've merely addressed the symptom, not the cause, of your problem.

 

You changed 

image_folder(folders).name

to the full path on line 14, but didn't make the same change on line 9. So I would not expect idx to be correct.

 

Did you change the value of 'train_folder' as specified in the instructions? If that had been changed correctly, the value of "image_folder(folders).name" should have been valid on line 9 and 14, not to mention lines 11, 13 and 19.

 

 

Please follow-up to let us know how you made out. For good karma, mark a reply as the answer if it helped!

Copilot Lvl 2
Message 3 of 3

Re: Error in cd(image_folder(folders).name);

Yes I made the same change on line 9.

 

I had changed the value of 'train_folder' as specified in the instructions.