Lecture 3 How to read, write and display multiple images

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 50

  • @sophalratitya6202
    @sophalratitya6202 3 місяці тому

    If the Img file name is not sequenced integer, can it work?

  • @eferhireaganbi9142
    @eferhireaganbi9142 Рік тому

    Hi, thanks for the tutorial, very helpful. But I am getting an error message about not being able to open the file due to not having write permission. How do I fix this error?

  • @Little_Krishna6
    @Little_Krishna6 3 роки тому

    Does it work in octave...?

  • @mubashirmasood5227
    @mubashirmasood5227 6 років тому

    how i increase the images in " save folder"
    mean if there is 3 images in " image Processing folder " and i crop these 3 images now after cropping the number of images is 6 , then only 3 images is save in " save folder " other 3 image is lost
    how i save these 6 images

  • @muktesmohan
    @muktesmohan 6 років тому

    How to save all these image matrix array in workspace with different name. Because only last image of loop is saved there.

  • @JayatiKrishna
    @JayatiKrishna 6 років тому +1

    Thank you sir...I want to apply some operations on images jointly. How can I do that? I have operations for single image, Want to apply on batch of images

  • @chyadchyad8303
    @chyadchyad8303 6 років тому

    Undefined function or variable 'srcfiles'. what to do with this ???

  • @iqrasaleem261
    @iqrasaleem261 6 років тому

    i want to compress one image and apply same technique on many images one by one, how can i do this?

  • @iqrasaleem261
    @iqrasaleem261 6 років тому +1

    how can i display image one by one, after one another

  • @swathiunni2034
    @swathiunni2034 6 років тому

    Sir, I 've multiple images in two folders one jpg and other png. I've to multiply both images and save the output in another folder. I've loaded both folders and I've created a function to multiple images in both folders. I've created a for loop for multiplication. I want to get all images multiplied to be in a folder. What changes should I do to get the output?

  • @farahinismail3483
    @farahinismail3483 6 років тому +2

    how can i create a mat file from these multiple images?

    • @Xjapan360d
      @Xjapan360d  6 років тому +2

      Hi, thanks for watching my tutorials. Please try the below code
      srcFile=dir('C:\Users\Muhammad Waqas\Desktop\New folder\*.jpg');
      for i=1:length(srcFile)
      filename=strcat('C:\Users\Muhammad Waqas\Desktop\New folder\',srcFile(i).name);
      I=imread(filename);
      figure,imshow(I);
      image{i}=I;
      save('save_multiple_images.mat','image')
      end
      % load('save_multiple_images.mat')
      Hope this will help. Thanks

    • @Xjapan360d
      @Xjapan360d  6 років тому +1

      Additionally, if you want to display the saved images in mat file. You can do so by including the following lines of code. In these lines of code, I retrieved the first image and display it accordingly.
      load('save_multiple_images.mat')
      image=image{1};
      imshow(image)

  • @jasmanrattol
    @jasmanrattol 7 років тому +1

    how we can write these .jpg images into other formats( like .png)

    • @Xjapan360d
      @Xjapan360d  7 років тому +1

      Hi Jasman Rattol,
      Thank you so much for watching my tutorial its very easy. Just try below example
      srcFile=dir('C:\Users\Muhammad Waqas\Desktop\Image Processing\*.jpg');
      for i=1:length(srcFile)
      filename=strcat('C:\Users\Muhammad Waqas\Desktop\Image Processing\',srcFile(i).name);
      I=imread(filename);
      figure, imshow(I);
      path=strcat('C:\Users\Muhammad Waqas\Desktop\Image Processing\save\',srcFile(i).name);
      fname=srcFile(i).name;
      fname = [fname(1:end-4),'.jpg'];
      imwrite(I,['C:\Users\Muhammad Waqas\Desktop\Image Processing\save\',fname],'png');
      end

    • @jasmanrattol
      @jasmanrattol 7 років тому

      Thanks a lot sir. It works but in 8th line it should be png. Thankyou so much

    • @Xjapan360d
      @Xjapan360d  7 років тому

      Glad to hear that its working with you. Please subscribe to my channel to watch more videos related to image processing and computer vision. Thanks

    • @Xjapan360d
      @Xjapan360d  7 років тому

      Welcome

    • @benben-dd9bu
      @benben-dd9bu 7 років тому

      Hi Muhammad Waqas,
      Thanks for your code, but i don't understand for the code (fname=srcFile(i).name;
      fname = [fname(1:end-4),'.jpg'];), why these code is needed?
      Thanks.

  • @stoka43
    @stoka43 6 років тому

    Great video, thanks ! I would like to know how I can change the extension of three images using you code.

  • @asmakaiser2326
    @asmakaiser2326 7 років тому

    How to save a multiple output images generated from a for loop in a single folder??

    • @Xjapan360d
      @Xjapan360d  7 років тому

      Just use imwrite() function in the loop.

  • @harsimrankaur1428
    @harsimrankaur1428 5 років тому

    Thanks for the simple and clear explanation Sir! Could you please let me know how to read 2 or more different format images from a folder.
    I tried using extension *.* but got an error
    srcFile=dir('F:\01 Harsimran\CoMoFoD_Less\*.*');
    Error using imread (line 347)
    Cannot open file "F:\01 Harsimran\CoMoFoD_Less\." for reading. You might not have read permission.
    I used 2 different for loops(as in the code below) which worked fine. Is there any other option as its quite lenghty?
    srcFile=dir('F:\01 Harsimran\CoMoFoD_Less\*.jpg');
    for i=1 : length(srcFile)
    filename=strcat('F:\01 Harsimran\CoMoFoD_Less\',srcFile(i).name);
    I=imread(filename);
    figure;
    imshow(I);
    end
    srcFile=dir('F:\01 Harsimran\CoMoFoD_Less\*.png');
    for i=1 : length(srcFile)
    filename=strcat('F:\01 Harsimran\CoMoFoD_Less\',srcFile(i).name);
    I=imread(filename);
    figure;
    imshow(I);
    end

  • @bashdarnoureddin8248
    @bashdarnoureddin8248 6 років тому +1

    Thanks, It's helpful.Could you share a tutorial about how some classification features work like KNN,NN ?if you have time

  • @tobey120
    @tobey120 6 років тому

    Hi I get this error ---> Undefined variable "scrFile" or class "scrFile".

    • @Xjapan360d
      @Xjapan360d  6 років тому +1

      Please share your code here in comment.

    • @chyadchyad8303
      @chyadchyad8303 6 років тому

      @@Xjapan360d same thing with me
      ??/

  • @Jenny-yy6vj
    @Jenny-yy6vj 7 років тому

    what is the use of strcat()?

    • @Xjapan360d
      @Xjapan360d  7 років тому +1

      strcat() function is used to concatenate the name and type of the image like (1.jpg or something.jpg).

  • @ramlabasharat4334
    @ramlabasharat4334 6 років тому +1

    very informative. thanx .. can u plz help me that how to classify images?

    • @Xjapan360d
      @Xjapan360d  6 років тому

      Glad to hear from you. For image classification, you need to use classification algorithm such as KNN, SVM, NN, C mean etc. Thanks

    • @ramlabasharat4334
      @ramlabasharat4334 6 років тому

      can u give me ur email?? i want to discuss my project

    • @azhariapriana1936
      @azhariapriana1936 6 років тому

      Hey thanks for this information, i have problem too with classify images using SVM. Can you give me a solution??

  • @ravigsourathya
    @ravigsourathya 6 років тому

    how to read 2 folder in one new script

  • @tufailabid4960
    @tufailabid4960 7 років тому +1

    Thank you sir for sharing this video.

    • @Xjapan360d
      @Xjapan360d  7 років тому

      Welcome, Glad to hear from you!

  • @mrregisx6261
    @mrregisx6261 2 роки тому

    Very helpful sir!

    • @Xjapan360d
      @Xjapan360d  6 місяців тому

      Thank you brother, also could you please subscribe to my channel please for my useful insights!

  • @newjaa122
    @newjaa122 6 років тому +1

    Thank you very much

  • @QaziMazhar
    @QaziMazhar 5 років тому +1

    very helpful

    • @Xjapan360d
      @Xjapan360d  6 місяців тому

      Thank you brother, also could you please subscribe to my channel please for my useful insights!

  • @dr.merrinprasannanagadasar1648
    @dr.merrinprasannanagadasar1648 6 років тому +1

    excellent

    • @Xjapan360d
      @Xjapan360d  6 місяців тому

      Thank you brother, also could you please subscribe to my channel please for my useful insights!