Fix line in rotate filter
This commit is contained in:
parent
327c00ac18
commit
5178e6fa1d
2
README
2
README
@ -59,7 +59,7 @@ Examples
|
||||
|
||||
./prpa -f drunk -f sepia -o bar.avi -c MP42 foo.avi
|
||||
./prpa -f blur=50 -f reverse -o bar.avi -c XVID foo.avi
|
||||
./prpa -f inlay=1,0,0 -o bar.avi -c XVID foo.avi
|
||||
./prpa -f inlay=1,0,0 -o bar.avi -c XVID foo.avi inlayed.avi
|
||||
./prpa -f strictinlay=255,137,42 -o bar.avi -c XVID orig.avi inlayed.avi
|
||||
|
||||
time ./prpa -f drunk -f sepia -o bar.avi -c MP42 foo.avi
|
||||
|
@ -9,7 +9,7 @@ void* Rotate::operator()(void* para)
|
||||
|
||||
if (direction_ == 0) // rotate-h
|
||||
for (size_t i = 0; i < mat->rows; ++i)
|
||||
for (size_t j = mat->cols / 2 + 1; j > 0; --j)
|
||||
for (size_t j = 0; j < mat->cols / 2; ++j)
|
||||
{
|
||||
cv::Vec3b tmp = mat->at<cv::Vec3b>(i, j);
|
||||
mat->at<cv::Vec3b>(i, j) = mat->at<cv::Vec3b>(i, mat->cols - j - 1);
|
||||
@ -17,7 +17,7 @@ void* Rotate::operator()(void* para)
|
||||
}
|
||||
|
||||
else if (direction_ == 2 || direction_ == -2) // rotate-v
|
||||
for (size_t i = mat->rows / 2 + 1; i > 0; --i)
|
||||
for (size_t i = 0; i < mat->rows / 2; ++i)
|
||||
for (size_t j = 0; j < mat->cols; ++j)
|
||||
{
|
||||
cv::Vec3b tmp = mat->at<cv::Vec3b>(i, j);
|
||||
|
@ -20,7 +20,8 @@ bool parse_cli(Configuration& conf, int argc, char** argv)
|
||||
("help,h", "produce help message")
|
||||
("filter,f", po::value<std::vector<std::string>>(), "apply a filter; "
|
||||
"choose between grey, reverse, cartoon, drunk, count, color=B,G,R, sepia,"
|
||||
" blur[=X], merge, interlace, inlay=B,G,R, strictinlay=B,G,R")
|
||||
" blur[=X], rotate-x, rotate-y, merge, interlace, inlay=B,G,R,"
|
||||
" strictinlay=B,G,R")
|
||||
("input-file,i", po::value<std::vector<std::string>>(), "file to treat")
|
||||
("output,o", po::value<std::string>(), "output file")
|
||||
("codec,c", po::value<std::string>(), "output codec")
|
||||
|
Reference in New Issue
Block a user