Skip to content

Object detector no longer works in MATLAB 2022a releaseΒ #4

@RayZhang001

Description

@RayZhang001

Since updated MATLAB from 2019b to 2022a, the Object Detector block for the Object Environment is no longer working. With the object environment and color picker block properly configured, the model won't compile due to a variable-size signal related issue within the Object Detector block.

The exact error message: Input signal at port 2 for "[object/Object Detector/Object Detector Src](matlab:open_and_hilite_hyperlink ('object/Object Detector/Object Detector Src','error'))" is a variable-size signal, but System object "ObjectDetectorRP" indicates that it expects a fixed-size input signal. Connect the input port to a fixed-size signal, or add/modify the 'isInputSizeMutableImpl' method to allow variable-size input signal

A simple workaround was tested to work, but not ideal:
step 1: making the function inside the objects subsystem (within the Object Detector block) always output a 5x3 matrix including info of active objects and NaNs for inactive ones.
step 2: apply a selector on the output signal with indices including all elements in the 5x3 matrix. The result can now be passed to the objects port of Object Detector Src with no error.

Please note the existence of this issue and consider having a fix for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions