While trying to solve the problem, i used something like fid= fopen(filename) that i saw in a solution online, now the code is not running again. it is showing error:
Error using imwrite (line 548)
Unable to open file "C:\Users\Asirajdin\Documents\T Chapters\Face Detection JKJJ\Class photos\Cropped\_"
for writing. You might not have write permission.
when I opened the error msg, the matlab code is pointing to the line 548, the code in 548 is this:
547 if fid == -1
548 error(message('MATLAB:imagesci:imwrite:fileOpen', filename));
549 else
550 % File can be created. Get full filename.
551 filename = fopen(fid);
552 fclose(fid);
553 end
please someone should help me out. Initially, it was working, it just that the all images are not cropped to the folder, only four shows in the folder and it continuously overwritting them untill the running finishes. Now, it is not working again.