returned error code 5
in
Integration and Hardware
•
4 months ago
Hello!
This code calculate the average color of the image. I don't understand why I get code 5 error.
And this error appears in my other programs too. Could you please explain why?
Precisely it says:
java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5
import arb.soundcipher.*;
SoundCipher sc = new SoundCipher(this);
PImage img = loadImage("111.jpg");
int s=img.width*img.height;
size(img.width, img.height);
image(img, 0, 0);
img.loadPixels();
float[][] pixelss = new float[4][s];
//
float SumRed=0;
float SumGreen=0;
float SumBlue=0;
int ij=1;
for (int i = 0; i < img.width; i++) {
for (int j = 0; j < img.height; j++) {
SumRed=SumRed+red(get (i,j));
SumGreen=SumGreen+green(get (i,j));
SumBlue=SumBlue+blue(get (i,j));
ij++;
// print(red(get (i,j))+" = ");
}
}
//print(SumRed);
print("red - "+SumRed/s+"; green - "+SumGreen/s+"; blue - "+SumBlue/s);
fill(SumRed/s,SumGreen/s,SumBlue/s);
noStroke();
background(255);
rect(int(img.width/4),int(img.height/4) , int(img.width/2),int(img.height/2));
1