Skip to content

Commit

Permalink
add comment about NV21. Fixes card-io#9
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Brateman committed Mar 16, 2015
1 parent a1edf80 commit 5b34144
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions card.io/src/main/jni/nativeRecognizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,10 @@ JNIEXPORT void JNICALL Java_io_card_payment_CardScanner_nScanFrame(JNIEnv *env,
IplImage *cbcr = cvCreateImageHeader(cvSize(width / 2, height / 2), IPL_DEPTH_8U, 2);
cbcr->imageData = ((char *)jBytes) + width * height;
IplImage *cb, *cr;

// Note: cr and cb are reversed here because Android uses android.graphics.ImageFormat.NV21. This is actually YCrCb rather than YCbCr!
dmz_deinterleave_uint8_c2(cbcr, &cr, &cb);

cvReleaseImageHeader(&cbcr);

dmz_edges found_edges;
Expand Down

0 comments on commit 5b34144

Please sign in to comment.