Separate touching objects and export images individually

2 Ansichten (letzte 30 Tage)
Nick
Nick am 27 Jun. 2018
Kommentiert: Nick am 2 Jul. 2018
Hi everyone,
I got an big image with a lot of histology sections in a series (look at image).
How can I separate and export the two images in the middle in an automatic way? I will have hundreds of these big images and there would probably be around 10-15 histological sections in one image.
I have tried to use watershed algorithm, but it detects several objects within a section and it didn't make a clear border between each section. I hope some of you got an better idea?
Beside that, is it possible to export the individual images afterwards without each section are touching each other? To show you how I would like the end product to look alike, I have used PhotoShop (PS) to isolate the section.
Thank you for your help
  6 Kommentare
Image Analyst
Image Analyst am 30 Jun. 2018
Are all the tops tilted and bottoms tilted? If so we could find the top and bottom and then look for discontinuities.
If the background always lighter and/or smoother than the part in the tile you want to detect?
Nick
Nick am 30 Jun. 2018
Yeah, the sections are all a bit tilted and the background are suppose to be lighter than the histological sections. One of the main problem is that the histological sections seems to be very noisy and some small spots are even more brighter than the background as you can see. When I apply the watershed algorithm it won't work, because there are many local maxima or minima, so I am a bit stuck.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Image Analyst
Image Analyst am 30 Jun. 2018
Well I need to go out and do some yard work but I'm attaching what I've got so far. But I thought I'd give it to you partially finished if you want to see what you can do with it. Basically I'm identifying the top and bottom edges and the gradient. See if you can finish it. Basically you have to identify big differences on the top and bottom and associate them. Once you know the locations of the separations/gaps in the top and bottom, you can use poly2mask to erase everything outside of that section and crop it out into a new image.
When you've finished with it, post what you've got and I'll comment on it or fix it.
  3 Kommentare
Image Analyst
Image Analyst am 2 Jul. 2018
Well now it's more complicated. I thought that all your sections were touching like a parade of elephants. Now we see that some are totally alone. So now you need to find the areas and if the area is around 1.5 times the expected area, split it apart, and if it's less than that leave it alone. Maybe you can just use imline() or roipolyold() to have the user do it. If there's only a few hundred images it would be faster for the user to do it than for you to develop an algorithm.
Nick
Nick am 2 Jul. 2018
Well... There will be more than 10.000 individual sections, and there will be hundreds of those big images. I know how to solve the problem now! :)
1. Find area of individual sections
2. If area is bigger than 1.8 than expected value => use the elephant algorithm!
Thanks again Image Analyst!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Read, Write, and Modify Image finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by