@@ -708,26 +708,6 @@ void ac::IncreaseLowBlueLevel(cv::Mat &frame) {
708708}
709709
710710void ac::Zoom (cv::Mat &frame) {
711- static double zoom_x = 2 , zoom_y = 2 ;
712- cv::Mat copy1;
713- cv::resize (frame, copy1, cv::Size (static_cast <int >(frame.cols *zoom_x), static_cast <int >(frame.rows *zoom_y)));
714- int y = 0 ;
715- for (int z = 0 ; z < frame.rows ; ++z) {
716- int x = 0 ;
717- for (int i = 0 ; i < frame.cols ; ++i) {
718- if (x < copy1.cols && y < copy1.rows && i < frame.cols && z < frame.rows ) {
719- cv::Vec3b &pixel = pixelAt (frame,z, i);
720- cv::Vec3b pix = copy1.at <cv::Vec3b>(y, x);
721- pixel = pix;
722- }
723- ++x;
724- }
725- ++y;
726- }
727- static int dir1 = 1 , dir2 = 1 ;
728- AlphaMovementMaxMin (zoom_x, dir1, 0.05 , 5 , 2.0 );
729- AlphaMovementMaxMin (zoom_y, dir2, 0.05 , 5 , 2.0 );
730- AddInvert (frame);
731711}
732712
733713void ac::IntertwineVideo640 (cv::Mat &frame) {
@@ -757,61 +737,9 @@ void ac::IntertwineCols640x8(cv::Mat &frame) {
757737}
758738
759739void ac::ZoomCorner (cv::Mat &frame) {
760- static double zoom_x = 2 , zoom_y = 2 ;
761- cv::Mat copy1;
762- cv::resize (frame, copy1, cv::Size (static_cast <int >(frame.cols *zoom_x), static_cast <int >(frame.rows *zoom_y)));
763- int y = copy1.rows -frame.rows -2 ;
764- for (int z = 0 ; z < frame.rows ; ++z) {
765- int x = copy1.cols -frame.cols -2 ;
766- for (int i = 0 ; i < frame.cols ; ++i) {
767- if (x < copy1.cols && y < copy1.rows ) {
768- cv::Vec3b &pixel = pixelAt (frame,z, i);
769- cv::Vec3b pix = copy1.at <cv::Vec3b>(y, x);
770- pixel = pix;
771- }
772- ++x;
773- }
774- ++y;
775- }
776- static int dir1 = 1 , dir2 = 1 ;
777- AlphaMovementMaxMin (zoom_x, dir1, 0.05 , 5 , 2.0 );
778- AlphaMovementMaxMin (zoom_y, dir2, 0.05 , 5 , 2.0 );
779- AddInvert (frame);
780740}
781741
782742void ac::ZoomRandom (cv::Mat &frame) {
783- static double zoom_x = 2 , zoom_y = 2 ;
784- cv::Mat copy1;
785- cv::resize (frame, copy1, cv::Size (static_cast <int >(frame.cols *zoom_x), static_cast <int >(frame.rows *zoom_y)));
786- int start_x = rand ()%(1 +(copy1.cols -frame.cols )), start_y = rand ()%(1 +(copy1.rows -frame.rows ));
787- int y = start_y;// copy1.rows-frame.rows-2;
788- for (int z = 0 ; z < frame.rows ; ++z) {
789- int x = start_x;// copy1.cols-frame.cols-2;
790- for (int i = 0 ; i < frame.cols ; ++i) {
791- if (x < copy1.cols && y < copy1.rows ) {
792- cv::Vec3b &pixel = pixelAt (frame,z, i);
793- cv::Vec3b pix = copy1.at <cv::Vec3b>(y, x);
794- pixel = pix;
795- }
796- ++x;
797- }
798- ++y;
799- }
800- static int dir1 = 1 , dir2 = 1 ;
801- AlphaMovementMaxMin (zoom_x, dir1, 0.05 , 5 , 2.0 );
802- AlphaMovementMaxMin (zoom_y, dir2, 0.05 , 5 , 2.0 );
803- AddInvert (frame);
804- static int dir_x = 1 ;
805- if (dir_x == 1 ) {
806- ++start_x;
807- ++start_y;
808- } else {
809- --start_x;
810- --start_y;
811- }
812- if (start_x < 0 || start_y < 0 ) {
813- dir_x = 1 ;
814- }
815743}
816744
817745void ac::MedianBlendByLowValue (cv::Mat &frame) {
0 commit comments