23 std::vector<int> encode_params;
24 encode_params.push_back(CV_IMWRITE_JPEG_QUALITY);
27 std::vector<uchar> encoded_buffer;
28 cv::imencode(
".jpeg", img, encoded_buffer, encode_params);
43 ss <<
"<img src=\"/stream?";
65 std::vector<int> encode_params;
66 encode_params.push_back(CV_IMWRITE_JPEG_QUALITY);
69 std::vector<uchar> encoded_buffer;
70 cv::imencode(
".jpeg", img, encoded_buffer, encode_params);
73 sprintf(stamp,
"%.06lf", time.
toSec());
75 .
header(
"Connection",
"close")
76 .
header(
"Server",
"web_video_server")
78 "no-cache, no-store, must-revalidate, pre-check=0, post-check=0, "
80 .
header(
"X-Timestamp", stamp)
81 .
header(
"Pragma",
"no-cache")
82 .
header(
"Content-type",
"image/jpeg")
83 .
header(
"Access-Control-Allow-Origin",
"*")
85 boost::lexical_cast<std::string>(encoded_buffer.size()))