Check Area

This function block allows users to define an area on an image using a mouse, and subsequently check if specified coordinate points are within that defined area.

📥 Inputs

Input Image The image in which you want to define an area and check for coordinates.

Position Coordinate(s) One or more coordinate points that you want to check whether they lie within the defined area.

📤 Outputs

Area Rectangle The coordinates of the defined area represented as a rectangle.

Object In Area A boolean output indicating whether any of the provided coordinates reside within the defined rectangle.

Detection Count The total number of coordinates that were found inside the defined area.

🕹️ Controls

Image Display This area displays the input image with the defined rectangles and detected points highlighted visually.

🎨 Features

Interactive Area Selection Users can visually select a rectangular area on the image by clicking and dragging with the mouse.

Coordinate Checking The block checks whether specified points are contained within the defined area, providing real-time feedback.

Visual Feedback The defined area and detected points are clearly marked on the image, allowing for easy verification.

📝 Usage Instructions

  1. Connect Input Image: Connect an image to the Input Image input.

  2. Draw Area: Click and drag on the displayed image to select a rectangular area. The selected area will be shown in green.

  3. Specify Coordinates: Provide the coordinates you want to check in the Position Coordinate(s) input.

  4. Evaluate: Run the block to check if the coordinates are within the defined area, visible on the image.

📊 Evaluation

When executed, this function block outputs whether the specified coordinates are within the drawn rectangle, alongside an image that visually represents the area and points checked.

💡 Tips and Tricks

Using Different Coordinate Systems

When providing coordinates, ensure they align with the coordinate system of the input image. This typically follows a pixel coordinate system where (0, 0) is the top-left corner.

Multiple Coordinate Inputs

You can provide multiple coordinates simultaneously. Ensure they are formatted correctly, as a list of tuples or lists.

🛠️ Troubleshooting

No Area Defined

If you try to evaluate coordinates without defining an area, you will not see any results. Make sure to click and drag on the displayed image to create an area first.

Invalid Coordinates

If an error occurs regarding input coordinates, check that the coordinates provided are within the dimensions of the image.

Last updated