-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting grid like pattern after image stitch many tiff files. #166
Comments
I think you need the |
I am again getting the same results as previous one. i am attaching my code. from ashlar import fileseries, thumbnail, reg
import numpy as np
from tifffile import imread, imwrite, TiffFile
readers = []
for i in range(3):
readers.append(fileseries.FileSeriesReader(
'/home/kuldeep/Downloads/Inferencing_with_Button/Input/',
pattern='image_{series:3}.jpg',
overlap=0.1,
width=11,
height=1,
layout='snake',
direction='horizontal', )
)
print(len(readers))
aligner0 = reg.EdgeAligner(readers[0], channel=0, filter_sigma=15, verbose=True)
aligner0.run()
mosaic_args = {}
mosaic_args['verbose'] = True
mosaic_args['flip_mosaic_y'] = True
aligners = []
aligners.append(aligner0)
mosaics = []
for j in range(1, 2):
aligners.append(
reg.LayerAligner(readers[j], aligners[0], channel=j, filter_sigma=15, verbose=True)
)
aligners[j].run()
print("aligners[0].mosaic_shape", aligners[0].mosaic_shape, aligners[0])
mosaic = reg.Mosaic(
aligners[j], aligners[0].mosaic_shape, None, **mosaic_args
)
mosaics.append(mosaic)
print(type(mosaic))
writer = reg.PyramidWriter(mosaics, r"/home/kuldeep/Downloads/Inferencing_with_Button/16*16.ome.tif",
verbose=True)
writer.run() |
Sorry, I meant for r in readers:
r.metadata._positions = r.metadata.positions * [-1, 1] (note this assigns back to However a bigger issue is that your example image appears to show a 17x17 grid but your FileSeriesReader arguments say Would you mind sharing your images so I could take a closer look? |
One other tip: to paste multiple lines of code in a comment here, wrap it in three back-quotes on each end, not one. Single back-quotes are for highlighting an inline code statement and do not work for multiple lines. I edited your comment accordingly to make the code easier to read. |
Thanks for the reply. Actually in the code it was 17*17. and it stitched well except grid like structure and second thing at stitched part pic is more blurred. |
I have many microscope images. i have stitched all the images but getting line between the two images and one image overlap with other due to which my stitched images seems to be blured. i am attaching the image for your reference.
![microscope](https://user-images.githubusercontent.com/48545766/206863826-3118a83b-e895-4c5a-9a03-3141612affea.png)
can you suggest me what i am missing. thanks in advance for helping.
The text was updated successfully, but these errors were encountered: