I got the image data from the camera like this:
byte[] imageArray=videoControl.getSnapshot(null),
Then I read the pixels and processed the data:
readBarcode(imageArray);
public void readBarcode(byte[] array){
...
gray=(array[4*imageWidth*yPos+3]*11+
array[4*imageWidth*yPos+2]*59+
array[4*imageWidth*yPos+1]*30 )/100;
...
}
I ran the program on my mobile phone nokia 6120c and it return 'error 0' at the line 'gray=(array[4*imageWidth*yPos+3]*11+
array[4*imageWidth*yPos+2]*59+array[4*imageWidth*yPos+1]*30 )/100'
What`s wrong with it?

Reply With Quote




