Histogram On Line

This function block analyzes and visualizes pixel values along a specified line in a binary or grayscale image. It helps to identify peaks in pixel intensity, providing valuable insights for image analysis.

📥 Inputs

Input Image (Binary Image) The source image where pixel values will be checked, usually in grayscale or binary format.

Line Location (pixel) The position of the line in the image at which the pixel values will be evaluated. It can accept multiple values for analyzing multiple lines.

Pixel Value Threshold A threshold value that determines the significance of the detected peaks along the specified line.

📤 Outputs

Output Image The altered image that visually marks the evaluated line and any detected peaks.

Peak Count The number of peaks found along the specified line(s).

Peak Start Locations The pixel positions of the detected peak start points.

Peak End Locations The pixel positions of the detected peak end points.

Peak Mean Locations The mean positions of identified peaks along the specified line(s).

🕹️ Controls

Line Direction Dropdown A dropdown control that allows you to specify whether the line in the image should be vertical or horizontal during analysis.

🎨 Features

Pixel Analysis Efficient identification of peak pixel values on a defined line within the image.

Visual Representation Outputs an annotated image that clearly shows the evaluated line, peaks detected, and their respective locations using circles.

📝 Usage Instructions

  1. Connect Input Image: Link a binary or grayscale image to the Input Image (Binary Image) input.

  2. Set Line Location: Specify the pixel location(s) for the line(s) you wish to analyze using the Line Location (pixel) input.

  3. Define Threshold: Enter a threshold value in the Pixel Value Threshold input. Ensure the value is between 0 and 255.

  4. Run the Block: Execute the block to analyze the pixel values along the specified line(s). The results will be displayed in the outputs.

📊 Evaluation

Upon execution, this function block processes the input image and generates an output displaying the evaluated image with peaks and their locations marked.

💡 Tips and Tricks

Image Processing for Better Results

Before using this function block, preprocess the image with Blur or Image Threshold to reduce noise and enhance the quality of detected peaks.

Testing Different Thresholds

To refine detection, experiment with various threshold values. Adjusting the threshold can greatly impact the number of peaks detected.

Analyzing Multiple Lines

When analyzing multiple lines, ensure that the line numbers do not exceed the image boundaries to avoid errors. You can use a loop to iterate through multiple lines effectively.

🛠️ Troubleshooting

Threshold Exceeds Limits

If you encounter an error indicating the threshold is out of range, ensure that the value lies between 0 and 255. Adjust as necessary.

No Peaks Detected

If no peaks are detected, verify the line location is valid and within image dimensions. Adjust the line number and check the input image for clarity.

Last updated