|
| ImageScrambler (QWidget *parent=0) |
| Constructor.
|
|
| ~ImageScrambler () |
| Destructor.
|
|
void | cropSwap (QImage &, int, int, int, int, int, int) |
| Funtion that crop two squares of equal size of an image or sub image and swaps them. The funtion receives two coords (x0, y0) and (x1, y1) and a width and a height. Then swaps pixel by pixel the square formed from the top left coordinate (x0, y0) to the bottom right coordinate (x0+width, y0+height) with the square formed from the top left coordinate (x1, y1) to the bottom right (x1+width, y1+height). More...
|
|
QImage | ScrambleFilter (QImage image, int, int, int, int, int) |
| Funtion that recursively scrambles an images by dividing the image in squares (sub images) and then swapping them. The first step the program does is divide the image in two or four squares and swap the squares, the resulting image is divided in four squares and then the same steps are applied recursively to each of the four squares. More...
|
|
void ImageScrambler::cropSwap |
( |
QImage & |
img, |
|
|
int |
x0, |
|
|
int |
y0, |
|
|
int |
x1, |
|
|
int |
y1, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
Funtion that crop two squares of equal size of an image or sub image and swaps them. The funtion receives two coords (x0, y0) and (x1, y1) and a width and a height. Then swaps pixel by pixel the square formed from the top left coordinate (x0, y0) to the bottom right coordinate (x0+width, y0+height) with the square formed from the top left coordinate (x1, y1) to the bottom right (x1+width, y1+height).
- Parameters
-
img | Reference to the image to swap the squares. |
x0 | The top left x coordinate of the first square in the image. |
y0 | The top left y coordinate of the first square in the image. |
x1 | The top left x coordinate of the second square in the image. |
y1 | The top left y coordinate of the second square in the image. |
width | Width of the squares |
height | Height of the squares |
QImage ImageScrambler::ScrambleFilter |
( |
QImage |
image, |
|
|
int |
N, |
|
|
int |
sx, |
|
|
int |
sy, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
Funtion that recursively scrambles an images by dividing the image in squares (sub images) and then swapping them. The first step the program does is divide the image in two or four squares and swap the squares, the resulting image is divided in four squares and then the same steps are applied recursively to each of the four squares.
- Parameters
-
image | The image to scramble |
N | The depth of the recursion. The image will be scrambled in 4^n squares. |
sx | Starting left top x coordinate of the image or sub image to divide |
sy | Starting left top y coodinate of the image or sub image to divide |
width | Width of the received image |
height | Height of the received image |
- Returns
- the scrambled image
QImage ImageScrambler::originalImage |
|
private |
the original image (imagen original)
int ImageScrambler::scrambleDepth |
|
private |
recursive depth (profundidad de la recursion)
QImage ImageScrambler::scrambledImage |
|
private |
scrambled image (imagen revuelta)
The documentation for this class was generated from the following files: