+/*******************************************************************************
+ * Parse ROI input values
+ * separator = ","
+ *******************************************************************************/
+int parse_ROI_values( char* inArg, unsigned int *ROI_x0, unsigned int *ROI_y0, unsigned int *ROI_x1, unsigned int *ROI_y1)
+{
+ int it = 0;
+ int values[4];
+ char delims[] = ",";
+ char *result = NULL;
+ result = strtok( inArg, delims );
+
+ while( (result != NULL) && (it < 4 ) ) {
+ values[it] = atoi(result);
+ result = strtok( NULL, delims );
+ it++;
+ }
+
+ if (it != 4) {
+ return EXIT_FAILURE;
+ }
+ else{
+ *ROI_x0 = values[0]; *ROI_y0 = values[1];
+ *ROI_x1 = values[2]; *ROI_y1 = values[3];
+ return EXIT_SUCCESS;
+ }
+}
+