Community Documents

Showing results for 
Search instead for 
Did you mean: 

Maximum Empty Rectangle - a LabVIEW and C implementation



I provide an example which is an implementation of a search algorithm to find the largest empty rectangle in a certain point set. General info:




A naive search algorithm (the first algorithm published in [1]) is implemented both in native LabVIEW and in C. The C source was developed in Code::Blocks IDE using MINGW-gcc compiler to get a DLL, callable from LabVIEW too.


Hardware and Software Requirements


LabVIEW for the LV part, and any suitable IDE/compiler for the C part. The "Calculate Array Differences" VI was used from the MGI Array toolkit (downloadable via VIPM).


Steps to Implement or Execute Code


Open the LV project, then the Launch the VI. Create a point set in the 2D Picture control using left mouse clicks. Find the Maximum Empty Rectangle (MER) either using the C DLL, or the native LV subVI.




Additional Information or References


[1] On the maximum empty rectangle problem - ScienceDirect. Available at:

Download All