Skip to content

Commit

Permalink
Merge remote-tracking branch 'oreilly/master' into gary
Browse files Browse the repository at this point in the history
  • Loading branch information
garybradski committed Jun 30, 2017
2 parents 1b37e8a + 6fab01a commit d07c438
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 2 deletions.
2 changes: 2 additions & 0 deletions example_02-07.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Example 2-7. The Canny edge detector writes its output to a single-channel (grayscale) image
// 2
#include <opencv2/opencv.hpp>

int main( int argc, char** argv ) {
Expand Down
2 changes: 2 additions & 0 deletions example_02-08.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// In Example 2-9, we show a simple way to read and write pixel values from Example 2-8.
//2
#include <opencv2/opencv.hpp>

int main( int argc, char** argv ) {
Expand Down
2 changes: 2 additions & 0 deletions example_02-10.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Example 2-10. The same object can load videos from a camera or a file
//
#include <opencv2/opencv.hpp>
#include <iostream>

Expand Down
5 changes: 5 additions & 0 deletions example_04-01.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Example 4-1. Summation of a multidimensional array, done plane by plane
#include <opencv2/opencv.hpp>
#include <iostream>

Expand All @@ -6,6 +7,10 @@ using namespace std;
// Summation of a multidimensional array, done plane by plane
//
int main( int argc, char** argv ) {

cout << "\nExample 4-1. Summation of a multidimensional array, done plane by plane"
<< "\nCall:\n"
<< argv[0] << endl;

const int n_mat_size = 5;
const int n_mat_sz[] = { n_mat_size, n_mat_size, n_mat_size };
Expand Down
5 changes: 5 additions & 0 deletions example_04-02.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Example 4-2. Summation of two arrays using the N-ary operator
#include <opencv2/opencv.hpp>
#include <iostream>

Expand All @@ -7,6 +8,10 @@ using namespace std;
//
int main( int argc, char** argv ) {

cout << "\nExample 4-2. Summation of two arrays using the N-ary operator"
<< "\nCall:\n"
<< argv[0] << endl;

const int n_mat_size = 5;
const int n_mat_sz[] = { n_mat_size, n_mat_size, n_mat_size };

Expand Down
5 changes: 5 additions & 0 deletions example_04-03.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//Example 4-3. Printing all of the nonzero elements of a sparse array

#include <opencv2/opencv.hpp>
#include <iostream>

Expand All @@ -8,6 +10,9 @@ using namespace std;
// Summation of a multidimensional array, done plane by plane
//
int main( int argc, char** argv ) {

cout << "\nExample 4-3. Printing all of the nonzero elements of a sparse array"
<< "\nCall:\n" << argv[0] << endl;

// Create a 10x10 sparse matrix with a few nonzero elements
//
Expand Down
25 changes: 23 additions & 2 deletions example_05-01.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
// alphablend <imageA> <image B> <x> <y> <width> <height> <alpha> <beta>
//
//#include <opencv2/opencv.hpp>
#include <opencv2/opencv.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>

using namespace cv;
using namespace std;

void help(const char **argv) {
cout << "\n\n"
<< "This program alpha blends on image onto another \n"
<< "Call:\n"
<< argv[0] << " <imageA> <image B> <x> <y> <width> <height> <alpha> <beta>\n\n"
<< endl;
}



int main( int argc, const char** argv )
{
help(argv);
if(argc != 9) {
cout << "\nERROR: Wrong # of parameters (9), you had " << argc \n" << endl;
return -1;
}
int main(int argc, char** argv) {
// Using the first two arguments, open up the image to be copied onto
// (src1), and the image that will be copied from (src2).
Expand Down

0 comments on commit d07c438

Please sign in to comment.