Home // International Journal On Advances in Systems and Measurements, volume 7, numbers 1 and 2, 2014 // View article
2D-Packing Images on a Large Scale: Packing a Billion Rectangles under 10 Minutes
Authors:
Dominique Thiebaut
Keywords: bin packing; rectangle packing; multi-threaded and parallel algorithms; heuristics; greedy algorithms; image collages
Abstract:
We present a novel heuristic for 2D-packing of rectangles inside a rectangular area where the aesthetics of the resulting packing is amenable to generating large collages of photographs or images. The heuristic works by maintaining a sorted collection of vertical segments covering the area to be packed. The segments define the leftmost boundaries of rectangular and possibly overlapping areas that are yet to be covered. The use of this data structure allows for easily defining ahead of time arbitrary rectangular areas that the packing must avoid. The 2D-packing heuristic presented does not allow the rectangles to be rotated during the packing, but could easily be modified to implement this feature. The execution time of the present heuristic on various benchmark problems is on par with recently published research in this area, including some that do allow rotation of items while packing. Several examples of image packing are presented. A multithreaded version of our core packing algorithm running on a 32-core 2.8 GHz processor packs a billion rectangles in under 10 minutes.
Pages: 80 to 90
Copyright: Copyright (c) to authors, 2014. Used with permission.
Publication date: June 30, 2014
Published in: journal
ISSN: 1942-261x