Skip to content

Commit

Permalink
Showing 5 changed files with 34 additions and 3 deletions.
Binary file not shown.
5 changes: 5 additions & 0 deletions Acid.Cam.v2.OSX/ac-filter2.cpp
Original file line number Diff line number Diff line change
@@ -133,6 +133,11 @@ void ac::randomFilter(cv::Mat &frame) {
int num;
do {
num = rand()%(draw_max-6);
size_t pos = 0;
pos = ac::draw_strings[num].find("Feedback");
if(pos != std::string::npos)
continue;

} while((ac::draw_strings[num] == "Random Filter") || (ac::draw_strings[num] == "RandomIntertwine") || (ac::draw_strings[num] == "RandomFour" || (ac::draw_strings[num] == "BlendThree") || (ac::draw_strings[num] == "RandomTwo") || ac::draw_strings[num] == "SoftFeedbackResizeSubFilter64" || ac::draw_strings[num] == "SoftFeedbackResizeSubFilter" || ac::draw_strings[num] == "SoftFeedbackSubFilter"));

draw_func[num](frame);
22 changes: 22 additions & 0 deletions Acid.Cam.v2.OSX/ac-filter8.cpp
Original file line number Diff line number Diff line change
@@ -973,6 +973,11 @@ void ac::SoftFeedbackRandFilter32(cv::Mat &frame) {


void ac::SoftFeedbackSubFilter(cv::Mat &frame) {


if(subfilter != -1 && ac::draw_strings[subfilter] == "SoftFeedbackSubFilter")
return;

Rect source(0, 0, frame.cols-1, frame.rows-1);
cv::Mat frame_copy = frame.clone();
int add_w = source.w/32;
@@ -997,6 +1002,10 @@ void ac::SoftFeedbackSubFilter(cv::Mat &frame) {

}
void ac::SoftFeedbackResizeSubFilter(cv::Mat &frame) {

if(subfilter != -1 && ac::draw_strings[subfilter] == "SoftFeedbackResizeSubFilter")
return;

static MatrixCollection<32> collection;
collection.shiftFrames(frame);
Rect source(0, 0, frame.cols-1, frame.rows-1);
@@ -1038,6 +1047,9 @@ void ac::SoftFeedbackResizeSubFilter(cv::Mat &frame) {

void ac::SoftFeedbackResizeSubFilter64(cv::Mat &frame) {

if(subfilter != -1 && ac::draw_strings[subfilter] == "SoftFeedbackResizeSubFilter64")
return;

static MatrixCollection<64> collection;
collection.shiftFrames(frame);
Rect source(0, 0, frame.cols-1, frame.rows-1);
@@ -1078,6 +1090,10 @@ void ac::SoftFeedbackResizeSubFilter64(cv::Mat &frame) {
}

void ac::SoftFeedbackReszieSubFilter64_Negate(cv::Mat &frame) {

if(subfilter != -1 && ac::draw_strings[subfilter] == "SoftFeedbackReszieSubFilter64_Negate")
return;

static MatrixCollection<64> collection;
collection.shiftFrames(frame);
Rect source(0, 0, frame.cols-1, frame.rows-1);
@@ -1122,6 +1138,12 @@ void ac::SoftFeedbackReszieSubFilter64_Negate(cv::Mat &frame) {
}

void ac::SoftFeedbackReszieSubFilter64_Mirror(cv::Mat &frame) {


if(subfilter != -1 && ac::draw_strings[subfilter] == "SoftFeedbackReszieSubFilter64_Mirror")
return;


static MatrixCollection<64> collection;
collection.shiftFrames(frame);
Rect source(0, 0, frame.cols-1, frame.rows-1);
6 changes: 5 additions & 1 deletion Acid.Cam.v2.OSX/ac-util.cpp
Original file line number Diff line number Diff line change
@@ -334,7 +334,7 @@ ac::DrawFunction ac::getFilter(std::string name) {
}

bool ac::testSize(cv::Mat &frame) {
if(frame.cols < 120 || frame.rows < 120)
if(frame.cols < frame.cols/64 || frame.rows < frame.rows/64)
return false;

return true;
@@ -344,6 +344,10 @@ ac::DrawFunction ac::getRandomFilter(int &index) {
int num;
do {
num = rand()%(draw_max-6);
size_t pos = 0;
pos = ac::draw_strings[num].find("Feedback");
if(pos != std::string::npos)
continue;
} while(ac::draw_strings[num] == "Blend Fractal" || ac::draw_strings[num] == "Blend Fractal Mood");
index = num;
return draw_func[num];
4 changes: 2 additions & 2 deletions Acid.Cam.v2.OSX/ac.h
Original file line number Diff line number Diff line change
@@ -591,8 +591,8 @@ namespace ac {
public:
static constexpr int ArraySize = Size;
MatrixCollection() : w(0), h(0) {
// for(int i = 0; i < Size; ++i)
// all_objects.push_back(&frames[i]);
for(int i = 0; i < Size; ++i)
all_objects.push_back(&frames[i]);
}
cv::Mat frames[Size+4];
int w, h;

0 comments on commit aa3170a

Please sign in to comment.