Back to FabImage Library website
You are here: Start » Function Reference » Region » Region Features » RegionInscribedBox

RegionInscribedBox
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationBasic |
Computes the largest box contained in a region.
Syntax
C++
C#
void fil::RegionInscribedBox ( const fil::Region& inRegion, const float inMinAspectRatio, ftl::Optional<float> inMaxAspectRatio, const int inMinWidth, ftl::Optional<int> inMaxWidth, const int inMinHeight, ftl::Optional<int> inMaxHeight, ftl::Conditional<fil::Box>& outBox )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inRegion | const Region& | Input region | ||
![]() |
inMinAspectRatio | const float | 0.0 - ![]() |
0.0f | Minimal aspect ratio of found box |
![]() |
inMaxAspectRatio | Optional<float> | 0.0 - ![]() |
NIL | Maximal aspect ratio of found box (reciprocal of inMinAspectRatio by default) |
![]() |
inMinWidth | const int | 1 - 65535 | 1 | Minimal width of found box |
![]() |
inMaxWidth | Optional<int> | 1 - 65535 | NIL | Maximal width of found box |
![]() |
inMinHeight | const int | 1 - 65535 | 1 | Minimal height of found box |
![]() |
inMaxHeight | Optional<int> | 1 - 65535 | NIL | Maximal height of found box |
![]() |
outBox | Conditional<Box>& | Found box with largest area |
Examples
![]() RegionInscribedBox performed on a sample region with inMaxAspectRatio = Auto. |
![]() RegionInscribedBox performed on a sample region with inMaxAspectRatio = 2.0. |