Thank Mikeporter's suggestions but I still can't solve the problem. My problem is as the title. I rewrote the program as ROIget.vi, but I still have no idea to get the complete (not extracted) ROI file just as the ROI image selected from the pop-up image window. The total size of the ROI pattern file (please see the attachment) created by IMAQ Vision Builder is about 25KB, but the ROI file produced by my ROIget.vi program is only "3KB" which can't be used to do the pattern matching work. I tried "IMAQ Expand" icon to replace the "IMAQ Extract" icon, but it still didn't work. Could anyone help me solve the problem? Thank you.