0

I have coordinates in a numpy array of all the images which needs to be joined. I have used OpenCV to find the coordinates using normalized cross-correlation. I am having a problem in tiling those images as it is very large 300X300 images of resolution 640X480 pixels. For now, I am using pyvips to merge all this image to form a high-resolution image, but it is talking around 20GB RAM.

Is there any method to bring it down to <4GB? Is there any database to store all the images and display the tiled images?

I will do all the preprocessing steps before using a database. I just need a high-resolution tiled image using images and coordinates without utilizing much RAM. Even I can make those images in a grid which can be joined directly without coordinates. Please suggest a way to achieve this.

Nakilon
  • 34,866
  • 14
  • 107
  • 142
  • Not sure I understand your usecase correctly, but isn't ffmpeg your friend? https://superuser.com/questions/625189/combine-multiple-images-to-form-a-strip-of-images-ffmpeg – David Brabant Jul 30 '18 at 06:50
  • I am not sure but I don't think ffmpeg will help in my case. It will use RAM for the tiling, which I don't want. – shivam chaubey Jul 30 '18 at 06:56
  • Why a need to have such huge image in the first place? – Nakilon Jul 30 '18 at 21:48
  • Why do you need to zoom google map? @Nakilon. Sometimes we need higher resolution Image to see a large number of details. For example, In Geology, histology etc. we need to view high resolutions details. – shivam chaubey Jul 31 '18 at 06:27
  • We don't need such a large image to view high-resolution image. We can view without making a large image. Related issue: https://github.com/openseadragon/openseadragon/issues/1506 – shivam chaubey Jul 31 '18 at 06:31
  • "We don't need such a large image to view high-resolution image." -- this is exactly why I ask you why do you want to get a high-resolution image instead of having a smart viewer that assembles parts when needed. – Nakilon Jul 31 '18 at 11:00
  • @Nakilon can you suggest some viewer which assembles part while viewing? I am using python – shivam chaubey Jul 31 '18 at 17:17
  • @shivamchaubey, unfortunately I don't know exact tools, but there are websites in the wild that allow you to browse high resolution video game maps with scroll and zoom similar to Google Maps. You may ask at https://softwarerecs.stackexchange.com/ what tool you need. – Nakilon Jul 31 '18 at 22:34
  • So you have 90,000 images, each measuring 640x480 pixels and you want to assemble these 90,000 images into a larger image measuring 300 smaller images on each side, so your final result will be 192,000x144,000 pixels, correct? – Mark Setchell Aug 25 '18 at 12:32
  • Furthermore you have a numpy array that tells you `image489.png` should be at pixel coordinates (100234,127102) in the final image, correct? – Mark Setchell Aug 25 '18 at 12:34
  • yes, numpy array have shape of 300,300,2 in case of 300X300 images. First "300" represents row size, second "300" represents columns and third "2" is the X, Y coordinate of an image. – shivam chaubey Aug 25 '18 at 12:56
  • yes, numpy array have shape of 300,300,2 in case of 300X300 images. First "300" represents row size, second "300" represents columns and third "2" is the X, Y coordinate of an image. – shivam chaubey Aug 25 '18 at 12:56
  • It would help if you showed a few rows of your numpy array and some indication as to what the elements mean... – Mark Setchell Aug 25 '18 at 17:04
  • Try Googling `DeepZoom` and `DZSAVE` in `pyvips`. – Mark Setchell Aug 27 '18 at 20:56

0 Answers0