Start a new topic

Cropping Region of Interest from the camera target

Hi , 

      I would like to crop the image of the target once it is recognised by the sdk from the camera.Can you please suggest a sample to it as i have gone through other thread its been mentioned it can be done writing a custom plugin using c++.Do u have any plugin written which is capable of doing so?I am completely new to Open CV as well.Please keep this in mind and let me know the solution for it.

1 person has this problem
1 Comment

Hello Ajeya,

Wikitude can only provide support for the implementation of our samples and not for each specific use case that our users might have. It is true that there is a way to crop the image by implementing your own plugin but unfortunately, we do not provide any code for that, as this is entirely up to you to code it. A simple code would look like that
void SomePlugin::cameraFrameAvailable(const wikitude::sdk::Frame& cameraFrame_) {
    unsigned char* fameData = cameraFrame_.getData();
    int frameWidth = cameraFrame_.getSize().width;
    int frameHeight = cameraFrame_.getSize().height;

    // save only a chosen portion of the data into a file here




Login or Signup to post a comment