воскресенье, 23 апреля 2017 г.

public class Main {
    public static void main(String[] args) {
   int x = 1;
   int y = 0;
   int z = 0;
        while(z<5) {
       
                x-=2;
        y=(x+z)*2;
        z++;
              for (int n=1; n<5; n++) { System.out.print(x + "\t" + y + "\t" + z);
   }
 
}

}
}

public class Main {
    public static void main(String[] args) {
   int x = 5;
   int y = 1;
   int z = 0;
         { 
            for (int n=1; n<7; n++) { System.out.println(x + "\t" + y + "\t" + z);
                x-=1;
        y+=1;
        z=(x+y)*2;
           
   }
   while(x>0);
         }
}
}
public class Main {
    public static void main(String[] args) {
   int x = 1;
   int y = 2;
   int z = 6;
for (x=1; x<5; x++) {
  y=(x*4);
  z++;
  System.out.println(x + "\t" + y + "\t" + z);
}
}
}

public class Main {
    public static void main(String[] args) {
   int x = 2;
   int y = 8;
   int z = -1;
while (z<0) { for(int n=1; n<7; n++){  System.out.println(x + "\t" + y + "\t" + z);}
  x+=3;
  y--;

}
}
}

четверг, 6 апреля 2017 г.

Images created by pixels. They make a grid and they have their own colour. In compression the quality of image decreases, because it takes many variation of colours in pixels and they make less milticolour pixels. They try to make it in fewer variation of pixels.  To decrease the quality of pixel or make smaller the size of pixel we use  Discrete Cosine Transform (DCT). The forward DCT is defined as

Then we build  8*8 block. It consists 64 DCT. Each element in the quantization matrix is an integer between 1 and 255.
 By using 
we decrease the number quantiazation in pixels.