openframeworks / openframeworks/openFrameworks

cant create copy of ofxCVImage when ROI is set

Open
#2,715 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

addon bug core section-2D
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

When a region of interest is set, a copy can't be made:

grayDiff.setROI(20, 20, 100, 100);
ofxCvGrayscaleImage *test = new ofxCvGrayscaleImage(grayDiff);
delete test;

When using resetROI(); there is no problem.

This happens for ofxCvGrayscaleImage, but probably any ofxCV image.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing ofxCvGrayscaleImage copy construction and its ROI handling. Reproduce the provided setROI() and copy/delete sequence, compare it with resetROI(), and confirm that copying an image with an active ROI completes without failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, opencv
Domain
computer-vision
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.