WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('in-progress') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

WordPress database error: [Table './ay6u3nor6dat6ba1/kn6_ayu1n9k4_5_actionscheduler_actions' is marked as crashed and last (automatic?) repair failed]
SELECT a.action_id FROM kn6_ayu1n9k4_5_actionscheduler_actions a WHERE 1=1 AND a.hook='aioseo_send_usage_data' AND a.status IN ('pending') ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 1

Converting RGB videos to grayscale in OpenCV | Loop and Break

Converting RGB videos to grayscale in OpenCV

cvtColor Converts an image from one color space to another.

Example

void cvtColor(InputArray src, OutputArray dst, int code, int dstCn=0 )

Parameters

src input image: 8-bit unsigned, 16-bit unsigned ( CV_16UC… ), or single-precision floating-point.
dst output image of the same size and depth as src.
code color space conversion code (see the description below).
dstCn number of channels in the destination image; if the parameter is 0, the number of the channels is derived automatically from src and code

Example

#include <cv.h>
#include <highgui.h>

using namespace std;
using namespace cv;

int main(int, char**)
{
	cvNamedWindow("grayImage", CV_WINDOW_AUTOSIZE);
	CvCapture* capture = cvCreateFileCapture("video.avi");
	IplImage* gray_out;
	IplImage* frame;
	while(1) 
	{
		frame = cvQueryFrame(capture);
		if( !frame ) break;

		gray_out = cvCreateImage( cvGetSize(frame), IPL_DEPTH_8U, 1 );

		// Converts Image from RGB Gray
		cvCvtColor(frame , gray_out, CV_RGB2GRAY);

		// displaying gray image
		cvShowImage("gray image", gray_out);

		char c = cvWaitKey(33);
		if( c == 27 ) break;
	}
	cvReleaseCapture(&capture);
	cvDestroyWindow("grayImage");
	return 0;
}
Share

You may also like...