91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 38KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-29
  • 語言: 其他
  • 標簽: Linux??V4L2??Opencv??Mat??

資源簡介

使用原始的RGB數據構造Opencv中的Mat對象。該資源使用Linux系統中的V4L2接口讀取攝像頭MJPEG圖像數據,解碼成RGB數據,再轉換為Opencv中的Mat對象所使用的BGR格式

資源截圖

代碼片段和文件信息

/****************************************************************************
# ? GspcaGui:??Gspca/Spca5xx?Grabber????????????????????????????#
#? Copyright?(C)?2004?2005?2006?Michel?Xhaard??????????????????#
#???????????????????????????????????????????????????????????????????????????#
#?This?program?is?free?software;?you?can?redistribute?it?and/or?modify??????#
#?it?under?the?terms?of?the?GNU?General?Public?License?as?published?by??????#
#?the?Free?Software?Foundation;?either?version?2?of?the?License?or?????????#
#?(at?your?option)?any?later?version.???????????????????????????????????????#
#???????????????????????????????????????????????????????????????????????????#
#?This?program?is?distributed?in?the?hope?that?it?will?be?useful???????????#
#?but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of????????????#
#?MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the?????????????#
#?GNU?General?Public?License?for?more?details.??????????????????????????????#
#???????????????????????????????????????????????????????????????????????????#
#?You?should?have?received?a?copy?of?the?GNU?General?Public?License?????????#
#?along?with?this?program;?if?not?write?to?the?Free?Software???????????????#
#?Foundation?Inc.?59?Temple?Place?Suite?330?Boston?MA??02111-1307??USA?#
#???????????????????????????????????????????????????????????????????????????#
****************************************************************************/?
#include?
#include?
#include??
#include?“color.h“

static?int?*LutYr?=?NULL;
static?int?*LutYg?=?NULL;;
static?int?*LutYb?=?NULL;;
static?int?*LutVr?=?NULL;;
static?int?*LutVrY?=?NULL;;
static?int?*LutUb?=?NULL;;
static?int?*LutUbY?=?NULL;;
static?int?*LutRv?=?NULL;
static?int?*LutGu?=?NULL;
static?int?*LutGv?=?NULL;
static?int?*LutBu?=?NULL;

#if?0
#define?RGB24_TO_Y(rgb)?LutYr[(r)]?+?LutYg[(g)]?+?LutYb[(b)]
#define?YR_TO_V(ry)?LutVr[(r)]?+?LutVrY[(y)]
#define?YB_TO_U(by)?LutUb[(b)]?+?LutUbY[(y)]

#define?R_FROMYV(yv)??CLIP((y)?+?LutRv[(v)])
#define?G_FROMYUV(yuv)?CLIP((y)?+?LutGu[(u)]?+?LutGv[(v)])
#define?B_FROMYU(yu)?CLIP((y)?+?LutBu[(u)])
#endif

unsigned?char
RGB24_TO_Y(unsigned?char?r?unsigned?char?g?unsigned?char?b)
{
return?(LutYr[(r)]?+?LutYg[(g)]?+?LutYb[(b)]);
}
unsigned?char
YR_TO_V(unsigned?char?r?unsigned?char?y)
{
return?(LutVr[(r)]?+?LutVrY[(y)]);
}
unsigned?char
YB_TO_U(unsigned?char?b?unsigned?char?y)
{
return?(LutUb[(b)]?+?LutUbY[(y)]);
}
unsigned?char
R_FROMYV(unsigned?char?y?unsigned?char?v)
{
return?CLIP((y)?+?LutRv[(v)]);
}
unsigned?char
G_FROMYUV(unsigned?char?y?unsigned?char?u?unsigned?char?v)
{
return?CLIP((y)?+?LutGu[(u)]?+?LutGv[(v)]);
}
unsigned?char
B_FROMYU(unsigned?char?y?unsigned?char?u)
{
return?CLIP((y)?+?LutBu[(u)]);
}

void?initLut(void)
{
int?i;
#define?Rcoef?299?
#define?Gcoef?587?
#define?Bcoef?114?
#define?Vrcoef?711?//656?//877?
#define?Ubcoef?560?//500?//493?564

#define?CoefRv?1402
#define?CoefGu?714?//?344
#define?Co

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????4012??2006-06-26?01:48??color.c
?????文件?????????416??2017-11-03?13:55??config.h
?????文件????????6440??2017-11-28?20:08??convert.cpp
?????目錄???????????0??2017-11-03?12:47??include\
?????文件????????2978??2017-04-05?16:16??include\color.h
?????文件?????????424??2017-11-03?12:34??include\config.h
?????文件?????????535??2017-11-03?12:58??include\convert.h
?????文件????????3250??2012-06-30?07:52??include\jinclude.h
?????文件?????????623??2017-03-31?20:07??include\pic_operation.h
?????文件????????1068??2017-11-03?12:31??include\v4l2.h
?????文件???????88883??2015-03-24?14:36??include\videodev2.h
?????文件????????6516??2012-06-30?07:52??jdatasrc-tj.c
?????文件????????1509??2017-11-28?20:02??main.cpp
?????文件????????1000??2017-11-03?13:36??makefile
?????文件?????????900??2017-09-02?17:14??makefile.build
?????文件????????8435??2017-11-03?13:26??v4l2.cpp
?????文件?????????956??2017-11-03?13:19??v4l2.h

評論

共有 條評論