12-18-2015 08:25 AM
@MarcoMauri wrote:
Hi!
Try this one.
I'm capturing the mouse click and creating on the fly a rectangular ROI of a given size.
Regards,
Marco
p.s. change the X and Y size of a ROI to a value different from 0... I forgot to update the default value.
Hi Marco,
Thanks a lot. It is working very well. I able to code with help of your reference vi attached in your post.
NOw I am facing another problem -
"Error -1074396154 occurred at IMAQ WritePNGFile
Possible reason(s):
IMAQ Vision: The image is not large enough for the operation."
Even after cropping a 100X100 ROI I am getting this message from a IMAQ Write File 2 vi. It has been used to save the cropped ROI.
I am trying hard to fix it.
I shall be thankful if anyone can pu some light on it.
Thanks.
12-18-2015 09:24 AM
Hi sukhiray, please attach your code which is generating the error. I tried to save mine for 2012, let's see if it works:
12-19-2015 01:04 AM
@Gregory wrote:
Hi sukhiray, please attach your code which is generating the error. I tried to save mine for 2012, let's see if it works:
Thanks gregoryj for your support. These are openable.
Now the previous problem has been solved. Presently I am getting trouble in saving the cropped ROI. See the attached code, The last vi to save image is returning error. I have attached the code and error snapshot.
I shall be thankful if you can help me to findout the problems or mistake in my codes.
Thanks again for your active participation.
12-19-2015 03:50 AM - edited 12-19-2015 03:55 AM
I use another method with more flexibility test this vi too
12-21-2015 01:15 AM
@Hatef wrote:
I use another method with more flexibility test this vi too
Thanks Hatef.
It is also working good but it is adding fill color which is not required.
Till thank you very much for your support.
12-21-2015 02:40 AM
there is the control in vi that you can select three method for roi
frame
highlight
and fill
chnge fill to frame for not filling
12-22-2015 12:36 AM
HI all, Thanks for your support.
My code is runnign well with floating ROI of user defined size.
Now I am getting an odd problem with IMAQ readfile vi. Sometimes it is working really good but next day it is showing error like -
------------------------------------------------------------------
Error -1074395995 occurred at IMAQ ReadFile
Possible reason(s): IMAQ Vision: File not found.
-------------------------------------------------------------------
I am really confused. Can anyone help me to understand this?
12-22-2015 01:15 AM
12-23-2015 04:14 AM
VI can't be uploaded as it is part of a big program and extracting that part will includes a huge hazzard.
I have solved this problem by designing my own VI for the same.