Class ColorResult

java.lang.Object
synapse.pipelines.color.ColorResult

public class ColorResult extends Object
Represents the result of a color detection pipeline run.

This object contains all detected color targets for a single frame, along with a designated primary detection (if one exists) and the timestamp at which the frame was processed.

  • Field Details

    • timestamp

      public float timestamp
      Timestamp (in seconds) at which this result was captured or processed. This is typically synchronized to the coprocessor or camera clock.
    • detections

      public ColorDetection[] detections
      All color detections found in the frame. This may be empty if no targets were detected.
    • main_detection

      public ColorDetection main_detection
      The primary or best color detection for this frame. This is usually selected based on criteria such as size, confidence, or proximity, and may be null if no detections are present.
  • Constructor Details

    • ColorResult

      public ColorResult()
  • Method Details

    • equals

      public boolean equals(Object obj)
      Compares this ColorResult to another object for equality.

      Two ColorResult instances are considered equal if they have the same timestamp, identical detection arrays (by contents), and equal primary detections.

      Overrides:
      equals in class Object
      Parameters:
      obj - the object to compare against
      Returns:
      true if the objects are equal, false otherwise
    • hashCode

      public int hashCode()
      Computes a hash code for this ColorResult.

      The hash code is derived from the timestamp, detection array contents, and primary detection, and is consistent with equals(Object).

      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this object