17 - Reading images in Python

  Рет қаралды 86,104

DigitalSreeni

DigitalSreeni

Күн бұрын

Пікірлер: 130
@chiho7311
@chiho7311 4 жыл бұрын
your lessons are really informative and easy to understand. Thank you
@gurdeepsinghbhatia2875
@gurdeepsinghbhatia2875 3 жыл бұрын
Excellent, i have seen lots of videos on image procesing but dont get satisfied, but yours video is too gud, THANKS A LOT SIR , HUGE RESPECT
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
You are most welcome
@nriezedichisom1676
@nriezedichisom1676 Жыл бұрын
The video length is perfect. Thank you
@mishraprakher009
@mishraprakher009 3 жыл бұрын
Thank you for such transformative lessons sir. You really owe much respect.
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
You are very welcome
@yevonnaelandrew9553
@yevonnaelandrew9553 3 жыл бұрын
Thank you for the lesson, it is extremely informative and has an excellent pace!
@marcuspaiva2652
@marcuspaiva2652 Жыл бұрын
Hello Dr Sreeni, I have an exercise of the University where I have to analyze a jpg image of a section of a siliciclastic rock and calculate the porosity area, quantity of grains, the cement area. Unfortunately, I cannot find where to solve this problem. I was wondering if maybe you could help me with that.
@notsam9528
@notsam9528 3 жыл бұрын
These videos are amazing. Very useful information!
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Glad you think so!
@nanomaX88
@nanomaX88 Жыл бұрын
thanks from austria
@MyDigitalEye
@MyDigitalEye 5 ай бұрын
Your tutorials are very helpful.
@utnapishtim307
@utnapishtim307 Жыл бұрын
Thank you so much!! Greets from Brazil.
@younesshokoohi1720
@younesshokoohi1720 4 жыл бұрын
Thanks!!! your channel is amazing.
@Mark-vv8by
@Mark-vv8by 2 жыл бұрын
your explanation was amazing, thanks sir.
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
You are most welcome
@iqbalhabibiehabibie5689
@iqbalhabibiehabibie5689 4 жыл бұрын
Thank you for your nice videos for reading images with different libraries, but I some difficulties follow using ometiff. It shows : ModuleNotFoundError: No module named 'apeer_ometiff_libary' I have install using pip : pip install apeer-ometiff-library on spyder like this: Requirement already satisfied: six in c:\anaconda3\lib\site-packages (from cycler>=0.10->matplotlib!=3.0.0,>=2.0.0->scikit-image->apeer-ometiff-library) (1.14.0) Note: you may need to restart the kernel to use updated packages. Then I restart the spyder, but when I run it again it shows ModuleNotFoundError: No module named 'apeer_ometiff_libary'. This is the script that I type: from apeer_ometiff_libary import io (pic2,omexml) = io.read_ometiff("images/test_image.ome.tif") print(pic2.shape) Any solution for this. Thanks, Iqbal
@Hadi-wn2hw
@Hadi-wn2hw 4 жыл бұрын
Best playlist you are the best
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Thank you very much for your kind comments.
@chris-lt3fb
@chris-lt3fb 4 жыл бұрын
Hello, I used cv2 to process a Tiff image. When saving the processed image with cv2.imwrite(), the dpi of the image has decreased to 96 dpi. Originally the tiff image has a horizontal and vertical resolution of 271 dpi. I didn't resize the image during the processing. Do you know a way how to prevent this or a way to solve this problem? Thank you
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
opencv (and also pyplot) does not allow you to set the dpi. In that case, I recommend using Pillow to save your images. from PIL import Image #Convert your colors from BGR to RGB, if needed Your_image = cv2.cvtColor(BGRimage, cv2.COLOR_BGR2RGB) img_in_pillow = Image.fromarray(Your_image) img_in_pillow.save('output.png', dpi=(271, 271))
@ahsanulkyumsiam8774
@ahsanulkyumsiam8774 10 ай бұрын
Thanks man , really great thing's
@zahrakhalid4731
@zahrakhalid4731 Жыл бұрын
Sir, when we use pyplot than colors show BGR and when we use cv2.imshow(img) than img in color RGB.Sir why you use BGR2RGB in cv2.imshow()??you use this at 54:30
@kentykatele4353
@kentykatele4353 2 ай бұрын
am straggling to get the right file path and get the picture read in the spyder environment. any help will be highly appriciated. here is the error am getting FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\USER - PC\\.spyder-py3\\image\\picture.tiff'
@AyushSharma-rd1ng
@AyushSharma-rd1ng 3 жыл бұрын
I am new to coding and image processing and trying to use the pillow liabrary to open one of my image. But it shows the "FileNotFoundError: [Errno 2] No such file or directory: 'images/test_image.jpg'". Do I need to need to save the image file any specific folder or at any specific path?
@maryamzarabian4617
@maryamzarabian4617 2 жыл бұрын
Really thanks for the lesson .
@ShakirKhan-th7se
@ShakirKhan-th7se 2 жыл бұрын
What is the best way to get input from different folders with different numbers of images each?
@boatengalexander5178
@boatengalexander5178 Жыл бұрын
Amazing videos ...many thanks
@vivekyadav-zl5dl
@vivekyadav-zl5dl 2 жыл бұрын
Thank you sir, such a nice lesson and explanation...very interesting
@sharannagarajan4089
@sharannagarajan4089 2 жыл бұрын
sir, you are golden, thank you very much
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
You are most welcome
@Onikbanerjee
@Onikbanerjee Жыл бұрын
Sir, can you help me with how to save all the images after processing them?
@n3r0z3r0
@n3r0z3r0 2 ай бұрын
You dont have to use cv2.destroyAllwindows() or cv2.destroyWindow( wndname ) after cv2.waitkey() is used. By using cv2.waitkey() you specify window close condition as any keypress
@vivekyadav-zl5dl
@vivekyadav-zl5dl 2 жыл бұрын
A similar type of video on appear_micro both of these r your channel?
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
apeer_micro is my work channel.
@pareshpriyadarshanrana2932
@pareshpriyadarshanrana2932 3 жыл бұрын
Can you please tell the best way to read a z-stack in python, and a way to save output as z-stack if possible.. thanks!
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
May be this video answers your question, kzbin.info/www/bejne/qHTGgqV3gtCgh5Y
@Vikknikk_Geolographer
@Vikknikk_Geolographer Жыл бұрын
Hello Sreeni, hope you are well. Can we follow your tutorial for satellite image processing in this way? or not if have any other way please do one tutorial on satellite image (e.g. on Sentinel-2 RGB-bands composite). Thank you.
@kelixoderamirez
@kelixoderamirez 3 ай бұрын
permission to learn sir thank you
@Learning_Electr0nics
@Learning_Electr0nics 3 жыл бұрын
Hello sir, How to read and visualize the .jp2 formate images in python...?? and how to covert it in .jpg formate, so that we can do all other operations easily. Please help
@seaweedseaside5905
@seaweedseaside5905 4 жыл бұрын
Thank you for your videos. They are amazing. Do you know how to access the metadata using czifile?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Here is how you can read metadat from czi files into Python. github.com/zeiss-microscopy/OAD/blob/master/jupyter_notebooks/Read_CZI_and_OMETIFF_and_display_widgets_and_napari/Read_and_Display_Images_using_Widgets_and_Napari.ipynb
@ParhamMahmoudi-g7b
@ParhamMahmoudi-g7b Жыл бұрын
EXCELLENT TEACHER
@Mohamedfaouzi-mk6sf
@Mohamedfaouzi-mk6sf Жыл бұрын
Hello. Thank you for your good explanation ❤. When i run the 9th line Python show me 'No sush file or directory 'image-test-image.jpg'
@neerajkumar6101
@neerajkumar6101 Жыл бұрын
Hello sir, Sir, How do i get czi file or how do i convert any img file to czi file ?
@parulsharma369
@parulsharma369 4 жыл бұрын
Thank you so much for great knowledge
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
My pleasure
@losaminos59
@losaminos59 3 жыл бұрын
Awesome vid. But is there a module library that is able to read and process 32-bit full float exr or tiff images? I have a 32 bit geo height map that I want to process using python script but don't know if there is a module that can read and process it.
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Rasterio may be able to handle those files. You can also try tifffile library. For rasterio, here is a video link. FYI, I did not work with 32 bit. kzbin.info/www/bejne/n5bcgHerfs-LppY
@tilkesh
@tilkesh 2 жыл бұрын
Excellent !!!!
@VarunKumar-pz5si
@VarunKumar-pz5si 3 жыл бұрын
Amazing Video
@anubhardwaj4766
@anubhardwaj4766 4 жыл бұрын
Very informative...thank you so much...
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
My pleasure
@arijitkaran9315
@arijitkaran9315 4 жыл бұрын
Dear Sir, when I am trying to run the open cv code, the editor is printing a message "No module named 'cv2'". Can you please guide me how to solve it.
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Looks like you do not have opencv. You can install it by typing this in the python console on the right side of your Spyder IDE. Type this: pip install opencv-python
@Jppvv492
@Jppvv492 2 жыл бұрын
where is this image saved in computer
@rahelsintayehu9070
@rahelsintayehu9070 Жыл бұрын
Thank you for great lessons sir. I tried to use matplotlib to open tif image but got an error. If anlyone manage it pls inform me. PIL.UnidentifiedImageError: cannot identify image file 'cliped.tif'
@saptarsheesarkar1657
@saptarsheesarkar1657 4 жыл бұрын
Respected Sir when I tried the opencv to read images clicked by DSLR and display them the images get zoomed in to a large extent in the window itself and i am getting to view only a small portion of the images which doesn't happen for images downloaded from google can you please explain me reason behind this and how could this be resolved.???
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
The image on the screen is displayed in its original size. I guess your DSLR images are large in size compared to downloaded images.
@taufiqtusar
@taufiqtusar 2 жыл бұрын
Effective & Efficient
@aminemohamedannidam9621
@aminemohamedannidam9621 2 жыл бұрын
Thanks profبزاف
@SohailKhan-tt5eh
@SohailKhan-tt5eh 2 жыл бұрын
Very well.
@azazkhan7475
@azazkhan7475 2 жыл бұрын
very nice
@KlElNlNlElDlY
@KlElNlNlElDlY Жыл бұрын
Hello, I am on Mac and I cannot get scikit-image to install for the life of me...I keep getting the error: "Could not build wheels for scikit-learn, which is required to install pyproject.toml-based projects" Can you help me out in any way?
@DigitalSreeni
@DigitalSreeni Жыл бұрын
I gave up on trying to install python packages on my son's mac with M1 chip. He is just using Google Colab now. I am not a fan of mac if you are into python coding, at least when all the libraries are trying to figure out how to deal with ARM M1.
@KlElNlNlElDlY
@KlElNlNlElDlY Жыл бұрын
@@DigitalSreeni I found after a lot of digging that many python packages aren't supported if your version is up to date. I have to downgrade to 3.9 and create a venv environment which then allowed me to go ahead with the install. Huge, huge headache 😅
@computersciencevideolectur5161
@computersciencevideolectur5161 3 жыл бұрын
How we run image file in python android phone
@SurajSingh-ph9vw
@SurajSingh-ph9vw 4 жыл бұрын
Sir there are alot of libraries available like pytorch, tensorflow, etc.. I am workimg on wheat detection project related to object detection problem. Which library i should use for this kind of project please help....
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Like you said there are many libraries, you just need to pick the one that works for your image analysis challenge. There is no library specifically for your application so you need to understand the exact image processing challenge and hunt for the best library. If you need suggestions then here goes... Traditional image processing libraries: (including machine vision and basic processing) opencv scikit-image Traditional machine learning (e.g. SVM, Random Forest, etc.) scikit-learn Deep machine learning keras (makes it easy to work with tensorflow) tensorflow pytorch (only if you have good coding skills)
@SurajSingh-ph9vw
@SurajSingh-ph9vw 4 жыл бұрын
Thanks alot sir😊
@divyagawande7228
@divyagawande7228 4 жыл бұрын
Hi, could you explain using openslide library to read the .svs image files?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
I tried and gave up. I cannot get openslide install on any of my systems. I hate such libraries, sorry to say.
@rs9130
@rs9130 3 жыл бұрын
Please make video on processing data for key points detection
@kerenevangeline3816
@kerenevangeline3816 4 жыл бұрын
Hi.....your videos are amazing! Thank you so much for sharing your knowledge. I want to open a .ndpi file and extract patches. What library should i use? and how to extract patches as it has multiple magnification levels. And if you don't mind can you share your email ID?
@baheribrahim5093
@baheribrahim5093 4 жыл бұрын
Hello Sir, When I tried to import opencv, I got this error; !import cv2 *** ModuleNotFoundError: No module named 'cv2' Could you please help me to fix that? Thanks, Baher
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Looks like you do not have opencv installed. Just type this in the console to install it: pip install opencv-python
@baheribrahim5093
@baheribrahim5093 4 жыл бұрын
@@DigitalSreeni Thank you so much. I think it was installed, but it gave me this error message. I am still beginner, so I do apologize if there is inconvenience. import cv2 Traceback (most recent call last): File "", line 1, in import cv2 File "/Users/baheribrahim/opt/anaconda3/lib/python3.7/site-packages/cv2/__init__.py", line 5, in from .cv2 import * ImportError: dlopen(/Users/baheribrahim/opt/anaconda3/lib/python3.7/site-packages/cv2/cv2.cpython-37m-darwin.so, 2): Symbol not found: _clock_gettime Referenced from: /Users/baheribrahim/opt/anaconda3/lib/python3.7/site-packages/cv2/.dylibs/libavutil.56.31.100.dylib (which was built for Mac OS X 10.13) Expected in: /usr/lib/libSystem.B.dylib in /Users/baheribrahim/opt/anaconda3/lib/python3.7/site-packages/cv2/.dylibs/libavutil.56.31.100.dylib
@alexiscarlier2773
@alexiscarlier2773 4 жыл бұрын
What are the advantages to put an image as float?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Float makes image processing tasks meaningful and possible. Without float, if you only work with integers, you will run into a lot of round off errors which of course lead to inaccurate results.
@azazkhan7475
@azazkhan7475 2 жыл бұрын
Any phd student here who is working on microscopy ?
@karthikm627
@karthikm627 4 жыл бұрын
Sir, I'm somuch excite for your special lectures on python image rocessing. I'm doing my PhD on medical image processing using python. Could you upload video lectures on medical image processing using dicom and nifti formats sir? Using breast ct imaging. Thank you..
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
I do not have any such data, do you have a specific example?
@양동진-k8h
@양동진-k8h 4 жыл бұрын
@@DigitalSreeni Thanks for your special lectures... It really helps me a lot. I also have a similar problem. Medical images, (such as CT, ultrasonogram and MRI) typically uses DICOM format image files. I also don't know how to handle DICOM image by using python. I want to do texture analysis of ultrosnogram image by pyradiomics, for anaylizing entropy, homogeniety, shpericity..... It really is a big hurdle for me.... thank you
@karthikm627
@karthikm627 4 жыл бұрын
@@DigitalSreeni example means... Finding cancer lesions in breast using CT or MRI dicom or nifti images sir
@humayrabintearfan2031
@humayrabintearfan2031 4 жыл бұрын
hi karthik m. Recently i am working on medical image processing, when i read research papers find that most of the works are based on dicom data set.As you are doing your PhD,can u help me to understand it, what does it mean by dataset? and what's the difference among various datasets as you mentioned dicom and nifti?
@andresporras9973
@andresporras9973 2 жыл бұрын
MVP
@manalihiremath2805
@manalihiremath2805 3 жыл бұрын
i am able to read only one image using glob...please help
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
I recorded a dedicated video for glob for my work account, may be that can help. kzbin.info/www/bejne/kGqTfHinf9R2adk
@manalihiremath2805
@manalihiremath2805 3 жыл бұрын
@@DigitalSreeni thankyou
@sharannagarajan4089
@sharannagarajan4089 2 жыл бұрын
Thanks
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Thank you very much Sharan.
@TonyStark-fn1sw
@TonyStark-fn1sw 4 жыл бұрын
Sir can you please share the link for the used data set of images
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
You can find it on my GitHub page github.com/bnsreenu/python_for_microscopists
@TonyStark-fn1sw
@TonyStark-fn1sw 4 жыл бұрын
@@DigitalSreeni Thank You so much sir
@bimalkumardora8405
@bimalkumardora8405 3 жыл бұрын
Can anyone tell me please topcon fda files
@edmald1978
@edmald1978 3 жыл бұрын
Hi sir thanks a lot for this tutorial. Did you have a tutorial in how to write czifile multichannel? Thank you ...
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
You cannot write czifile using python as there is no library for that. In fact, you will not find libraries to write proprietary images. If you want to saves images as czi please download ZEN Lite software by Zeiss.
@edmald1978
@edmald1978 3 жыл бұрын
@@DigitalSreeni Thank you sir for you reply.
@aryanghadrdan2552
@aryanghadrdan2552 Жыл бұрын
Hello sir Thank you very much I got this error: error: OpenCV(4.6.0) C:\ci_311_rebuilds\opencv-suite_1679001454889\work\modules\highgui\src\window.cpp:967: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'
@vimalrocz2253
@vimalrocz2253 2 жыл бұрын
what is PIL?
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
One of the image processing libraries in python. pypi.org/project/Pillow/
@rukey3001
@rukey3001 4 жыл бұрын
Please make a video series of 3d images (point cloud) . Thank you.
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Sure, if I have time and if I find relevance to microscopy.
@vmdhar
@vmdhar 3 жыл бұрын
Can you make github for these images and code, i think it's very usefull for students like me. Thank you
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Please have a look at the description for my videos to get the github link.
@Piyush4113
@Piyush4113 3 жыл бұрын
how to read high resolution images say 12000*6000 pixels and then get pixel coordinates bu using mouse? Please if anybody could tell it would be great
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
You seem to be looking for a desktop software. You can try ZEN. The lite version is free and comes with many useful tools. Just google search for ‘zeiss zen lite’
@Piyush4113
@Piyush4113 3 жыл бұрын
@@DigitalSreeni thank you so much but if it is possible through opencv or any other libraries in python it would be great!! I need to use the image for some project and I had to write code in python for that!!
@1UniverseGames
@1UniverseGames 3 жыл бұрын
Sir in the czifile portion, i actually installed as you said and try to run the code by it gives me an err like this- AttributeError: module 'czifile' has no attribute 'imread' . what should i do as i am not sure does they have different syntax here to use or not?
@1UniverseGames
@1UniverseGames 3 жыл бұрын
conda install -c conda-forge czifile
@aominedaikii4559
@aominedaikii4559 2 жыл бұрын
Hello sir, I've installed the latest spyder ide and it doesn't come with scikit-image library. I've tried installing using pip, conda but its not working. Can u pls help regarding this. Thank you
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Is this issue only with sciki-image or with all libraries. pip install is the easiest and most reliable way to manage python libraries so I wonder if you are doing it the right way. From spyder IDE, in the console, you just need to type: pip install package_name If that doesn't work, may be you need to run it from the command prompt.... you can simulate that by typing the following in the spyder IDE python console: !pip install package_name If that doesn't work, open the console for your environment. In the start meny, find Anaconda3, then find the Anaconda prompt for your environment. Then type: python pip install scikit-image Also try: python -m pip install -U scikit-image
@aominedaikii4559
@aominedaikii4559 2 жыл бұрын
@@DigitalSreeni thank you sir for the reply, the issue is only for scikit-image. All other libraries are working well. I've tried all the above methods you've mentioned but the error is still there. I'm getting "module not found" error, if i try to add the path to python site-pkgs, im getting "scikit-image is not installed properly" error.
@aominedaikii4559
@aominedaikii4559 2 жыл бұрын
I was getting "no module named 'skimage' " error even after installing using above methods. I added a path to (../site-packages) via tools>pythonpath and I'm getting "cannot import name 'geometry' from 'skimage._shared'. It seems that scikit-image has not been built correctly. Your install of scikit-image appears to be broken" error.
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Then try installing a stable older version.
@aominedaikii4559
@aominedaikii4559 2 жыл бұрын
@@DigitalSreeni is there any alternative IDE which i can use sir?
@joli6866
@joli6866 5 ай бұрын
Thanks!
@DigitalSreeni
@DigitalSreeni 4 ай бұрын
Thank you :)
@maheshvangala8472
@maheshvangala8472 4 жыл бұрын
Sir how can I convert normal jpg image to czi image
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Why do you need to convert JPG to CZI? You can read proprietary images using python and save them to other format but you cannot write into proprietary formats using python. If you really want to save images as CZI then please download the free version of ZEN, called ZEN Lite. www.zeiss.com/microscopy/us/products/microscope-software/zen-lite.html (If you are from outside US you may be led to a different landing page, just Google search for 'ZEISS ZEN Lite ')
18 - Image processing using pillow in Python
31:11
DigitalSreeni
Рет қаралды 42 М.
20 - Introduction to image processing using scikit-image in Python
37:25
Apple peeling hack @scottsreality
00:37
_vector_
Рет қаралды 130 МЛН
Как подписать? 😂 #shorts
00:10
Денис Кукояка
Рет қаралды 7 МЛН
Fake watermelon by Secret Vlog
00:16
Secret Vlog
Рет қаралды 16 МЛН
Image Processing with OpenCV and Python
20:38
Rob Mulla
Рет қаралды 160 М.
22 - Denoising microscope images in Python
20:11
DigitalSreeni
Рет қаралды 33 М.
Extract Text From Images in Python (OCR)
29:24
NeuralNine
Рет қаралды 279 М.
Solving Wordle using information theory
30:38
3Blue1Brown
Рет қаралды 10 МЛН
19 - image processing using scipy in Python
27:14
DigitalSreeni
Рет қаралды 24 М.
How to Preprocess Images for Text OCR in Python (OCR in Python Tutorials 02.02)
53:24
Python Tutorials for Digital Humanities
Рет қаралды 159 М.
How PNG Works: Compromising Speed for Quality
32:00
Reducible
Рет қаралды 635 М.
Apple peeling hack @scottsreality
00:37
_vector_
Рет қаралды 130 МЛН