is there a way to calculate how many files there are in a folder ??
For example I have 24 .txt files in a folder and I want a sketch
that counts the files so it outputs a number 24..
i would like to do bilinear interpolation on an image..I had the program in C, and I understand how it works but i dont know what to replace the unsigned char image_in[][] and image_out[][] as i dont know what this represent..The RGB of grayscale?? the intensity?? could someone help me..im noob at this..
I downloaded the library and tried one of the example here.
Interpolation
When I run the sketch on processing 1.5.1, I got this error:
NoSuchMethodError: you may be using a library that's incompatible with this version of processing.
im using simpleOpenNI and would like to lower the resolution from the default 640 x 480..
Is it possible?? If it is, how it is done? the lower the better..
I would like to read .txt incrementally using for loop..I know this isnt working, just for example:
i want to read action1.txt, action2.txt, action3.txt
for i = 0 to i = 3
read action[i].txt;
end
Is this possible??
and if so, could somone teach me how??
I would like to know if it is possible to clear .txt file(without closing and open new createwriter() with the same file name)..??
If it possible, how to do it??
Im writing some 3 values of x,y,z position into txt file for 150 frame every 5 seconds(means 3x150 data in 5 seconds)..and I would like to clear those values as I wont be using it in the next 5 seconds or so..if I dont clear the values, the size of the txt file will continue to increase, and I would like to avoid that to happen..
I tried using arraylist to store those 3 values for 150 frames and then clear the contents by clear()..but the output visual becomes stiff and not smooth(I got about 80 frames in 5 seconds instead of 150)..so Im thinking of saving those values for a while in txt file and read the values from it..
Is there any other way to achieve what Im trying to do??Sorry,this would be second question..
it wont be any help but Ill put my code(necessary part) below anyway just in case
//if we're recording tell the recorder to capture this frame
I would like to run a program in 5 seconds and then reset the timer back to 0
so the timer will start to count from 0 to 5 seconds again after the new frame..but failed with
the code below..could someone show me what is wrong??
But when I add a code as below whether in a new tab or below line 50 of above code, I got an error stating " expecting EOF, found 'columns' " that is highlighted at the 3rd line of above code..The weird part is,even i commented out below's code, the error still remains..only when I erase the code that the error will gone..
Help please
class jacobi{
static final double EPS = pow(10,-6);
static final double TINY = pow(10,-20);
static final int MAX=ITER = 100;
static void kaiten(double[][] a, int i, int j, int k, int l, double c, double s){
double x = a[i][j], y = a[k][l];
a[i][j] = x*c - y*s;
a[k][l] = x*s + y*c;
}
public static boolean solve(double[][] a, double[][] w){
Have anyone here tried using this library??
If you have could you please help me on calculating eigenvalues and eigenvectors??
for EJML
I dont understand on how to use the SimpleMatrix or the DenseMatrix64F..
how to even create a matrix??
which will be better or easier to use for solving eigenvalue problem??
EJML or JAMA??
I would like to insert numbers in txt file "Head.txt" and insert it to a A_matrix but failed with error:
ArrayIndexOutOfBoundsException: 313
my Head.txt will be like for eg.
1 2 3
4 5 6
......
311 312 313
means it takes a form of 313 x 3 matrix..
my code will be as below..
BufferedReader reader;
String line;
int rows=0;
double[][] A_matrix = new double[313][3];
void setup() {
// Open the file from the createWriter() example
reader = createReader("Head.txt");
}
void draw() {
try {
line = reader.readLine();
} catch (IOException e) {
e.printStackTrace();
line = null;
}
while(line != null){
String[] nums = split(line, ' ');
for(int j=0; j<3; j++){
A_matrix[rows][j] = Double.parseDouble(nums[j]);
}
rows++;
}
}
I know that this is not a good program but I couldnt think of any better..Please help me..
I'll send through email or upload on some hosting webpage if anyone need the file Head.txt