# cv::error: (-215:Assertion failed) !boundingBox.empty() in function 'init'

- **ID:** `opencv/tracker-init-no-bbox`
- **Domain:** opencv
- **Category:** assertion_error
- **Error Code:** `-215`
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

The bounding box passed to cv::Tracker::init is empty (width or height is zero), often due to invalid detection or user input.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 4.5.0 | active | — | — |
| 4.7.0 | active | — | — |
| 4.10.0 | active | — | — |

## Workarounds

1. **Validate bounding box before init: if (bbox.width > 0 && bbox.height > 0) { tracker->init(frame, bbox); } else { /* handle error */ }** (100% success)
   ```
   Validate bounding box before init: if (bbox.width > 0 && bbox.height > 0) { tracker->init(frame, bbox); } else { /* handle error */ }
   ```
2. **Ensure bbox is computed correctly from detection; for example, if using cv::selectROI, check that the user actually selected a region.** (90% success)
   ```
   Ensure bbox is computed correctly from detection; for example, if using cv::selectROI, check that the user actually selected a region.
   ```

## Dead Ends

- **** — The empty() check only verifies width and height are zero; negative coordinates are allowed but may cause later issues; however, the assertion still passes if width/height > 0. (60% fail)
- **** — empty() returns true if width <= 0 or height <= 0; both must be positive for the assertion to pass. (100% fail)
