Community Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum Empty Rectangle - a LabVIEW and C implementation

Overview

 

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: https://en.wikipedia.org/wiki/Largest_empty_rectangle

 

Description

 

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 MAIN.vi. 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.

 

MER_1_FP.png

 

Additional Information or References

 

[1] On the maximum empty rectangle problem - ScienceDirect. Available at: https://www.sciencedirect.com/science/article/pii/0166218X84901240.

Download All
Contributors