title: Crop image in scilab
body: <p>I want to crop image using mouse selection at particular region of interest in scilab,here my code is</p>
  
  <pre><code>I=imread('G:\SCI\FRAME\mixer2.jpg');  
     I1G = rgb2gray(I);
     figure();ShowImage(I1G,'mixer');
     IN1G = gca();
     rect1 = rubberbox();
     ROI1=imcrop(I1G,rect1);disp(ROI1);
  </code></pre>
  
  <p><strong>But it gives the following error: The rectangle is out of the image range.</strong>
  and i also use xclick and xgetmouse function for cropping using mouse selection and it also gives the same error.
  please give me suggestions for correcting code .</p>
  
  <p>Thanks and Regards</p>