So I am doing a bonus assignment to help balance my mark in programming but the assignment itself is very awkward and involves using a programming language called Processing. Its similar to Java and I will post the problem I am having, but it is too big as a pdf so I converted it to text. Essientially I am having trouble with loading the proper image. The code that is provided that is supposed to load the image is
byte[][] imageArray; // The binary fingerprint image as an array
byte[][] maskArray; // The binary mask as an array
for (int col=1; col<originalFingerprint.width-1; col++) {
for (int row=1; row<originalFingerprint.height-1; row++) {
maskArray[col][row] = 0;
if (brightness(originalFingerprint.get(col, row)) < 127)
imageArray[col][row] = 1;
else
imageArray[col][row] = 0;
}
}
But When I put this in the setup procedure it returns an error of null for maskArray.
I could provide the link to the language if nessasary since its free and I can provide the code I have so far, but I understand what I need to do in the assignment, just check above and below a pixel, left and right, and determine if its on the edge essientially. I can handle that, but I cant even get the image to load. The problem is he requires the array to be of the byte data type while I am used to using int as the array data type.
byte[][] imageArray; // The binary fingerprint image as an array
byte[][] maskArray; // The binary mask as an array
for (int col=1; col<originalFingerprint.width-1; col++) {
for (int row=1; row<originalFingerprint.height-1; row++) {
maskArray[col][row] = 0;
if (brightness(originalFingerprint.get(col, row)) < 127)
imageArray[col][row] = 1;
else
imageArray[col][row] = 0;
}
}
But When I put this in the setup procedure it returns an error of null for maskArray.
I could provide the link to the language if nessasary since its free and I can provide the code I have so far, but I understand what I need to do in the assignment, just check above and below a pixel, left and right, and determine if its on the edge essientially. I can handle that, but I cant even get the image to load. The problem is he requires the array to be of the byte data type while I am used to using int as the array data type.








