32 - Grain size analysis in Python using a microscope image

  Рет қаралды 37,407

DigitalSreeni

DigitalSreeni

Күн бұрын

Пікірлер: 83
@alkhashtee
@alkhashtee 3 жыл бұрын
Man, I really appreciate and respect your way of explaining the theory part and the programming part of each step you do. Thank you very much.
@deba_barmn
@deba_barmn 5 жыл бұрын
This is the exact topic I have been searching for a long time
@DigitalSreeni
@DigitalSreeni 5 жыл бұрын
Glad I could help :)
@hamidcheraghi4114
@hamidcheraghi4114 4 жыл бұрын
To be honest, I really like the way you teach. I learned a lot from your informative tutorials. Thanks
@sauravroy3420
@sauravroy3420 2 жыл бұрын
I love your work sir. I graduated last year as a bio-technologist, but I loved image analysis. Now following your tutorial I'm going ahead!!
@felip6180
@felip6180 4 жыл бұрын
Thnak you very much for this video! it will help me with guidelines on how to automate image parameters analysis Also, my 13 yo cousin said he wanted to learn programim. I've done some reseatch into python and by god found your channel and gave it to him - his english is not good but he said he can learn A LOT from your videos!!! thank you for such high quality content!!!.
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
My 12 year old son and his buddies have been learning python for the last couple of years. Your cousin is doing the right thing by learning to code, very important for his/her future. I believe you can turn subtitles on for my videos, hopefully that helps. Otherwise I hope you can find videos in your local language. My son started with this book a few years ago, books.google.com/books/about/Python_for_Kids.html?id=pMEUG8oNBfkC&printsec=frontcover&source=kp_read_button
@felip6180
@felip6180 4 жыл бұрын
@@DigitalSreeni thank you very much!!!!!
@ottomorris463
@ottomorris463 5 жыл бұрын
I just want to say thank you for making these videos. They are fantastic and are really helping with my own research .
@DigitalSreeni
@DigitalSreeni 5 жыл бұрын
Glad to hear that you find them useful.
@patrickwl6019
@patrickwl6019 Жыл бұрын
Amazing idea, looking forward to recreate similar code for blasting fragmentation👌
@milindvadagave
@milindvadagave 3 жыл бұрын
cannot import name 'check_nD' from partially initialized module 'skimage._shared.utils' (most likely due to a circular import) facing this in spyder. plz help
@elifozkan9836
@elifozkan9836 3 жыл бұрын
This tutorial was super helpful ! Thanks for a million times
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
You're welcome!
@felipemondaca5106
@felipemondaca5106 3 жыл бұрын
​ @DigitalSreeni Hi. Thanks for your video. I have the same question that DJ Deka. Why are you using 0.5 um? I know that 1px = 264.58 um. I am using an image SEM with your python code to calculate particle size. My image has a magnification of x50,000 and its scale bar is 100 nm. Is 0.5 um right for my case? Thanks.
@fedormaksimov8666
@fedormaksimov8666 2 жыл бұрын
Hello Dr., thank you for this video. Could you please reply whether some functions exist for 3D grain analysis?
@leilakhalili9393
@leilakhalili9393 2 жыл бұрын
Thank you very much for the video. I really enjoyed both of them(python command and concept).
@furkankalkan3920
@furkankalkan3920 2 жыл бұрын
Sir, thank you for clear explanation. But I need to ask for plt.hist command if my image was 24 or 36 bit
@ihossain
@ihossain 6 ай бұрын
Thanks!
@DigitalSreeni
@DigitalSreeni 6 ай бұрын
Thank you very much
@nairsrijith8553
@nairsrijith8553 3 жыл бұрын
Can you please help me to get Voronoi tessellation diagram of PDLC material plzzz sir
@cqllysto
@cqllysto 2 жыл бұрын
Hello Sir, thank you so much for your video tutorial! It was really helpful. Is there a way to get the coordinates of each particle that we find? Thanks once again
@jayminsanchaniya6528
@jayminsanchaniya6528 2 жыл бұрын
Hello, can we same program to identify orientation of fibers in microscope image?
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
This approach doesn't care about the application, as long as the fibers are segmentable.
@raviperi6908
@raviperi6908 Жыл бұрын
Quite helpful and informative, training me well..@digitalsreeni your intent is well received..thank you and please keep doing these..
@srikrishnarkapillalamarri3496
@srikrishnarkapillalamarri3496 4 жыл бұрын
Hello sir, could you make introduction video about particle tracking (trackpy) using particle flow videos, I could not find am forum where I could request you about this. Thank you,
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
I will add them to my list. Thanks for the suggestion.
@nadiaakter9351
@nadiaakter9351 3 ай бұрын
can I use this to train a model?
@srikrishnarkapillalamarri3496
@srikrishnarkapillalamarri3496 4 жыл бұрын
Hello Sir, thank you very much for this detailed explanation. I evaluated the feret diameter of microscopic particles using ImageJ. I would like automate the entire process using Python. I have tried the code which you have explained, but not able to measure the dimensions of the mask. P,lease suggest
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Please watch my video 116.
@srikrishnarkapillalamarri3496
@srikrishnarkapillalamarri3496 4 жыл бұрын
@@DigitalSreeni sir, thank you very much, this will help me greatly in automating my feret diameter measurements for ~500 images
@aldoblack5982
@aldoblack5982 3 жыл бұрын
One question regarding the image reading. I tested plt.hist() using skimage and cv2. When showing the image, is the same, but when plotting the data in histogram, it shows different data. Any idea why? They are both as gray.
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
I believe skimage uses 64 bit float while reading images whereas opencv uses ubyte (unsigned integer). Try converting skimage imported image to ubyte and then looking at histogram. Hopefully it matches with the opencv histogram. from skimage import img_as_ubyte, io img = io.imread("your_image") img_as_ubyte = img_as_ubyte(img)
@aldoblack5982
@aldoblack5982 3 жыл бұрын
@@DigitalSreeni That works perfectly well. Thank you for the response.
@mahrouch
@mahrouch 5 жыл бұрын
Fantastic work, thank you very very much for what you are doing. I like when you're cheating... good job, hope you continue to make such excellent videos.
@nabilelalem1010
@nabilelalem1010 4 жыл бұрын
This is brilliant, thank you so much
@DesertWolf90
@DesertWolf90 2 жыл бұрын
How you knew at the beginning that the scaling factor pixels_to_um = 0.5 ?
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
This is a number you get from your imaging device - basically pixel size that gets captured or you need to define based on the scalebar.
@alirassi5697
@alirassi5697 4 жыл бұрын
this video was really one of your best uploads Sreeni! great content did you manage to make that video with cell images that you mentioned at around 39:55?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Yes, video 35.
@shuvamgupta2236
@shuvamgupta2236 3 жыл бұрын
Hi sir how to measure volume of particles in 3d images? Please let us know.
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
Once you segment them into individual objects, you just look at total number of pixels (voxels) to find the volume. If you know the pixel size, you can convert pixel volume to real units (e.g., um3).
@madscientist7464
@madscientist7464 3 жыл бұрын
Thank you very much for your videos! These are very very helpful!
@aleenab2002
@aleenab2002 10 ай бұрын
Which version of python is this?
@redhwanalgabri7281
@redhwanalgabri7281 4 жыл бұрын
from skimage import measure, color, io, can I use them with cv2 instead of skimage?? If I can, please, help.
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
I don't understand your question. You can use skimage or opencv if an equivalent function exists. A quick Google search can tell you whether the function exists in a given library.
@AvanHirtum
@AvanHirtum 4 жыл бұрын
image_measurements.csv initially gave me a blank table, no values nor header in it (even though the script ran without error). It took a little while to realize that my mistake was to still have at the bottom of the python file: cv2.imshow('eroded', eroded) cv2.waitKey(0) Leaving out these two lines produced the desired result.. a filled table (columns Area...MaxIntensity and rows 1..N for each detected cluster)
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Those 2 lines are just displaying your image on the screen, the code will not move unless you close the opened window. You can set a wait time under waitKey(0); instead of 0 which means you have to close the window manually you can set a value, e.g. 5000 (5 seconds).
@biltumahato1138
@biltumahato1138 4 жыл бұрын
Hi Sreeni, Thank you for the video. You have well explained every steps. I am analysing an image of fiber reinforced composite transverse section. I have to find out the coordinate of center of fiber (approx. circular) and diameter. I see you used equivalent diameter which I can use for diameter. But I don't know what to use to extract coordinate of each fiber center. For simplicity, its equivalent in your analysis would be to find centre of each grain assuming each grain as circular.
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Please watch my video 116 to understand how to get properties of segmented / labelled regions. The output provides you with a lot of measurements including centroid. Here is the link to regionprop documentation. scikit-image.org/docs/dev/api/skimage.measure.html#skimage.measure.regionprops
@angkhira
@angkhira 4 жыл бұрын
sir, thanks a lot for the explanation. Could you explain what does the intensity in skimage measure means? does higher value means brighter or darker regions?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Intensity is basically pixel values for that specific object in your original image. Yes, it means brighter and darker in your original image.
@haintuvn
@haintuvn 4 жыл бұрын
Thank you very much for your video. I wonder if we can write the label_name ( in column 1 of the csv file) to the original image? I want to know which label related to which position in the image!
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
You can report label and also coordinates for the label. Please check the documentation for regionprops to see all the parameters that you can report. scikit-image.org/docs/dev/api/skimage.measure.html#skimage.measure.regionprops
@anjalichandra5249
@anjalichandra5249 3 жыл бұрын
sir,pls upload the video of analysis of segmented part after u-net segmentation
@MadeYourVideo
@MadeYourVideo 5 жыл бұрын
hello I have a question for the output you generate what is the grain size in nm² and how much grains do i have in my image, it might be depends on the scale of the image which are you took with the microscope but how can I measure that? thank you very much
@DigitalSreeni
@DigitalSreeni 5 жыл бұрын
In the code I converted pixels to microns based on the scaling factor. If you want square nanometers instead of square microns then just multiply sq. microns by 1 million (10^6). I hope this answers the question. In fact, if you want to convert any units the best online resource is Wolfram Alfa. Here is the link where you can see um2 converted to nm2. www.wolframalpha.com/input/?i=1+um2+to+nm2
@rangarajankasturi8756
@rangarajankasturi8756 2 жыл бұрын
Great job srini.
@DigitalSreeni
@DigitalSreeni 2 жыл бұрын
Thanks
@paul-tiberiumiclea1429
@paul-tiberiumiclea1429 3 жыл бұрын
Dear Sreeni, very nice tutorial. I have a question. In imageJ (or pevious versions) it is possible to show the grains as countour and also the label inside. In the tutorial you show hou tho see the label_marks as colors. There is any chanse to show them as contur? I try using skimage.contour but then the numbe of contours and the number of label_mask is different. Thanks
@hammao
@hammao 3 жыл бұрын
I want to personally thank you for this wonderful videos... This exactly what I need to up my python and image analysis game. Besides, you side comments makes the whole exercise humanly !!! for example, I can easily relate to looking and typing 😂😂😂 I have two questions 1. for the grain size analysis, do you mind using actual geological samples ( I have many I can share), the sample you're using to demonstrate is to easy to use but geological or soil samples can be very more complex to work with. 2. I started following the videos you recorded for Apeer, then I stumbled on this set of videos (microscopy series), which seems to directly talk to me 😅😂😂😂😂. Which playlist do you recommend among the two? My aim is to gain mastery in image analysis of geological samples.
@djdekabaruah3457
@djdekabaruah3457 4 жыл бұрын
Great Video. One question. What is the the major and minor axis measuring unit - Pixels or micron?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
It calculates pixels by default, we convert it to microns by multiplying the output with the scaling factor (pixel_to_um).
@djdekabaruah3457
@djdekabaruah3457 4 жыл бұрын
@@DigitalSreeni thank you for your reply. Is 1 pixel=0.5 microns a standard?
@pankajarmo129
@pankajarmo129 4 жыл бұрын
I am pursuing a project to Encode microstructure using python, can you upload video or share some relevant information for the topic as it is very difficult to find.
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
I don't know what you mean by 'encode microstructure', can you please elaborate?
@pankajarmo129
@pankajarmo129 4 жыл бұрын
@@DigitalSreeni i.e digitaly representing microstructure from an given image
@homerianreyes8688
@homerianreyes8688 3 жыл бұрын
Great very well taught and I learn a lot. Just want to know if this is applicable on normal grain images? which is not microscopic image. Thank you for the response.
@DigitalSreeni
@DigitalSreeni 3 жыл бұрын
This is a generic approach that should work with any image, provided you pay attention to each step and define parameters accordingly.
@homerianreyes8688
@homerianreyes8688 3 жыл бұрын
@@DigitalSreeni oh thank you! actually I'm trying to segment multiple grains in an image and save is as a separate images, is there any video you recommend in your playlist that I can learn concerning this topic?
@hizkialie1954
@hizkialie1954 4 жыл бұрын
in what unit the area and perimeter are?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Unless you multiply them with scaling factor the units will be in pixels and square pixels. Multiply them by pixel size to convert to physical units.
@hossein2204
@hossein2204 4 жыл бұрын
Very informative and brilliant...Can you please record another video on stereology which helps obtain 3D grain size distribution from 2D images?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Not an easy topic to cover in a video, unless a library already exists. I will see if I can find a library on this topic.
@djdekabaruah3457
@djdekabaruah3457 4 жыл бұрын
Sir, learning a lot from your video. Great Help!! One request, could you create one video for microalloyed steel/(cementite in tempered martensite matrix) with grain analysis (Feret diameter, FeretX and FeretY)?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Can you please share an image?
@djdekabaruah3457
@djdekabaruah3457 4 жыл бұрын
@@DigitalSreeni I have mailed the image to you. Looking forward to your video..
@muhammadalam2498
@muhammadalam2498 4 жыл бұрын
Do you have a Patreon account where I could contribute?
@DigitalSreeni
@DigitalSreeni 4 жыл бұрын
Thanks for asking. Yes, I do have a Patreon page where I collect proceeds for charity. If you'd like to contribute here is my Patreon page: www.patreon.com/bnsreenu
@sau002
@sau002 Жыл бұрын
Excellent
@jimquinn
@jimquinn 5 жыл бұрын
Thank you. Liked. Subscribed. Please google : Mike Meier Artificial Microstructure. His PDF article on creating images for ASTM grain sizeing is neoclassic.
33 - Grain size analysis in Python using watershed
38:48
DigitalSreeni
Рет қаралды 23 М.
266 - Openslide library for whole slide images
33:37
DigitalSreeni
Рет қаралды 21 М.
Вопрос Ребром - Джиган
43:52
Gazgolder
Рет қаралды 3,8 МЛН
Sigma girl VS Sigma Error girl 2  #shorts #sigma
0:27
Jin and Hattie
Рет қаралды 124 МЛН
She wanted to set me up #shorts by Tsuriki Show
0:56
Tsuriki Show
Рет қаралды 8 МЛН
348 - Image Similarity Search with VGG16 and Cosine Distance
22:07
DigitalSreeni
Рет қаралды 2,1 М.
Why Does Diffusion Work Better than Auto-Regression?
20:18
Algorithmic Simplicity
Рет қаралды 436 М.
Curve Fitting in Python (2022)
24:50
Mr. P Solver
Рет қаралды 102 М.
Image Processing with OpenCV and Python
20:38
Rob Mulla
Рет қаралды 196 М.
Auto-Measuring with OpenCV + Python - Try It Yourself
25:17
Clayton Darwin
Рет қаралды 94 М.
Inside the V3 Nazi Super Gun
19:52
Blue Paw Print
Рет қаралды 2,6 МЛН
58 - What are Gabor filters?
25:59
DigitalSreeni
Рет қаралды 55 М.
30 - Image registration using homography in openCV
46:42
DigitalSreeni
Рет қаралды 37 М.
What P vs NP is actually about
17:58
Polylog
Рет қаралды 147 М.
Лайфхак: Легально делать деньги
0:43
LOVE or MONEY? ❤️💸 (PART 14)
0:47
Alan Chikin Chow
Рет қаралды 3,5 МЛН
Это лютый угар 🤣 | приколы Арсен Симонян
0:14
Арсен Симонян
Рет қаралды 294 М.