Skip to content

There is no difference between the original image and the edited image #24

@Quangninh-io

Description

@Quangninh-io

I try to use your library created in code
` Mat &ori_image = *((Mat *) origin_address);
Mat &target_mat = *((Mat *) target_address);
Mat &source_mat = *((Mat *) source_address);
Mat &result_mat = *((Mat *) result_address);

cvtColor(ori_image, ori_image, COLOR_RGBA2RGB);
cvtColor(result_mat, result_mat, COLOR_RGBA2RGB);
cvtColor(target_mat, target_mat, COLOR_RGBA2GRAY);
cvtColor(source_mat, source_mat, COLOR_RGBA2GRAY);

Inpaint::CriminisiInpainter inpainter;

inpainter.setSourceImage(ori_image);
//
inpainter.setTargetMask(target_mat);
inpainter.setSourceMask(source_mat);
inpainter.setPatchSize(20.0f);
inpainter.initialize();


inpainter.image().copyTo(result_mat);
LOGD("write success");`

but the image of the result and the original is the same, the targetMat is a white image on a black background, and so is the originMat but in a different location, I wonder if there is any need to edit or add anything to your code I don't let it work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions