I need help. I would like someone to help me how can i make the program selecte the picture let say picture 01 till picture 02 by squence on each picture it has to read a number on the picture let say 01 and then picture two 02 ....etc.
I need to know how can i read those number without using the loading the picture it mean it will do it automatically instead each time the pop ask me to load the picture and then i have to use my OCR to read the number but my concern is just i need to able to load the picture wihtout using the pop loader as i do it now manually.
it mean it read the number automatically without showing the picture. I included the code below maybe someone can help me and it is on C code only. thanks a lot mamashi
int main (int argc, char *argv[])
{
int success = 1;
int err = 0;
char** imagePath; // Image Path
int cancelled;
ImageType imageType; // Image Type
Image* image; // Image
// IMAQ Vision creates windows in a separate thread
imaqSetWindowThreadPolicy(IMAQ_SEPARATE_THREAD);
// Display the Load Image dialog
imagePath = imaqLoadImagePopup(NULL, "*.*", NULL, "Open Image", FALSE, IMAQ_BUTTON_LOAD, 0, 0, 1, 0, &cancelled, NULL);
if (!cancelled)
{
// Get the type of the image file to create an image of the right type
imaqGetFileInfo(imagePath[0], NULL, NULL, NULL, NULL, NULL, &imageType);
// Create an IMAQ Vision image
image = imaqCreateImage(imageType, 7);
// Read the image from disk
imaqReadFile(image, imagePath[0], NULL, NULL);
// Vision Assistant Algorithm
success = IVA_ProcessImage(image);
if (!success)
err = imaqGetLastError();
// Display the image
imaqMoveWindow(DISPLAY_WINDOW, imaqMakePoint(0,0));
imaqSetWindowPalette(DISPLAY_WINDOW, IMAQ_PALETTE_GRAY, NULL, 0);
imaqDisplayImage(image, DISPLAY_WINDOW, TRUE);
// Wait for a key press before exiting
printf ("Press Enter to exit.\n");
getchar();
// Dispose resources
imaqDispose(image);
}
imaqDispose(imagePath);
return 0;
}
I need to know how can i read those number without using the loading the picture it mean it will do it automatically instead each time the pop ask me to load the picture and then i have to use my OCR to read the number but my concern is just i need to able to load the picture wihtout using the pop loader as i do it now manually.
it mean it read the number automatically without showing the picture. I included the code below maybe someone can help me and it is on C code only. thanks a lot mamashi
int main (int argc, char *argv[])
{
int success = 1;
int err = 0;
char** imagePath; // Image Path
int cancelled;
ImageType imageType; // Image Type
Image* image; // Image
// IMAQ Vision creates windows in a separate thread
imaqSetWindowThreadPolicy(IMAQ_SEPARATE_THREAD);
// Display the Load Image dialog
imagePath = imaqLoadImagePopup(NULL, "*.*", NULL, "Open Image", FALSE, IMAQ_BUTTON_LOAD, 0, 0, 1, 0, &cancelled, NULL);
if (!cancelled)
{
// Get the type of the image file to create an image of the right type
imaqGetFileInfo(imagePath[0], NULL, NULL, NULL, NULL, NULL, &imageType);
// Create an IMAQ Vision image
image = imaqCreateImage(imageType, 7);
// Read the image from disk
imaqReadFile(image, imagePath[0], NULL, NULL);
// Vision Assistant Algorithm
success = IVA_ProcessImage(image);
if (!success)
err = imaqGetLastError();
// Display the image
imaqMoveWindow(DISPLAY_WINDOW, imaqMakePoint(0,0));
imaqSetWindowPalette(DISPLAY_WINDOW, IMAQ_PALETTE_GRAY, NULL, 0);
imaqDisplayImage(image, DISPLAY_WINDOW, TRUE);
// Wait for a key press before exiting
printf ("Press Enter to exit.\n");
getchar();
// Dispose resources
imaqDispose(image);
}
imaqDispose(imagePath);
return 0;
}