Apparently it is actually the Y channel that we want.
This commit is contained in:
parent
7e9c707f92
commit
b05bc211f7
|
@ -2003,7 +2003,7 @@ bool Monitor::Analyse() {
|
|||
) ) {
|
||||
Debug(1, "assigning refimage from v-channel");
|
||||
Image v_image(snap->in_frame->width,
|
||||
snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[2], 0);
|
||||
snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[0], 0);
|
||||
ref_image.Assign(v_image);
|
||||
} else if (snap->image) {
|
||||
Debug(1, "assigning refimage from snap->image");
|
||||
|
@ -2093,7 +2093,7 @@ bool Monitor::Analyse() {
|
|||
((AVPixelFormat)snap->in_frame->format == AV_PIX_FMT_YUVJ420P)
|
||||
) ) {
|
||||
Debug(1, "assigning refimage from v-channel");
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[2], 0);
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[0], 0);
|
||||
ref_image.Assign(v_image);
|
||||
} else {
|
||||
Debug(1, "assigning refimage from snap->image");
|
||||
|
@ -2108,7 +2108,7 @@ bool Monitor::Analyse() {
|
|||
||
|
||||
((AVPixelFormat)snap->in_frame->format == AV_PIX_FMT_YUVJ420P)
|
||||
) ) {
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[2], 0);
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[0], 0);
|
||||
snap->score = DetectMotion(v_image, zoneSet);
|
||||
} else {
|
||||
snap->score = DetectMotion(*(snap->image), zoneSet);
|
||||
|
@ -2337,7 +2337,7 @@ bool Monitor::Analyse() {
|
|||
((AVPixelFormat)snap->in_frame->format == AV_PIX_FMT_YUVJ420P)
|
||||
) ) {
|
||||
Debug(1, "Assigning from vchannel");
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[2], 0);
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[0], 0);
|
||||
ref_image.Assign(v_image);
|
||||
} else if (snap->image) {
|
||||
Debug(1, "Assigning");
|
||||
|
@ -2352,7 +2352,7 @@ bool Monitor::Analyse() {
|
|||
)
|
||||
) {
|
||||
Debug(1, "Blending from vchannel");
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[2], 0);
|
||||
Image v_image(snap->in_frame->width, snap->in_frame->height, 1, ZM_SUBPIX_ORDER_NONE, snap->in_frame->data[0], 0);
|
||||
ref_image.Blend(v_image, ( state==ALARM ? alarm_ref_blend_perc : ref_blend_perc ));
|
||||
} else if (snap->image) {
|
||||
Debug(1, "Blending because %p and format %d != %d, %d", snap->in_frame,
|
||||
|
|
Loading…
Reference in New Issue