How to program with Vision sensor?

So i’ve setup my vision sensor with GCUBE PCUBE and OCUBE and i want to make a program that realtime tells you the width and height of these 3 objects printed onto the brain, would anyone happen to know how to do that?