Stray output example in XorS (cvXorS) (Bug #238)


Added by Josiah Yoder almost 15 years ago. Updated almost 15 years ago.


Status:Done Start date:
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:documentation
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

The documentation for the XorS (cvXorS) function on this page:

http://opencv.willowgarage.com/documentation/python/operations_on_arrays.html#xors

Contains the extraneous comment

The code should print:

(1.0,0.0) (0.0,-1.0) (-1.0,0.0) (0.0,1.0)

Either the code which produces this is missing, or this is in the wrong section of the documentation.


Associated revisions

Revision f4433ff9
Added by Andrey Kamaev about 12 years ago

Merge pull request #238 from asmorkalov:android_resolution_sample

History

Updated by Josiah Yoder almost 15 years ago

The missing code is:

The following sample demonstrates how to conjugate complex vector by switching the most-significant bit of imaging part:

float a[] = { 1, 0, 0, 1, -1, 0, 0, -1 }; /* 1, j, -1, -j /
[[CvMat]] A = cvMat( 4, 1, CV_32FC2, &a );
int i, neg_mask = 0x80000000;
cvXorS( &A, cvScalar( 0, *(float
)&neg_mask, 0, 0 ), &A, 0 );
for( i = 0; i < 4; i++ )
printf("(%.1f, %.1f) ", a[i*2], a[i*2+1] );

This was taken from the old documentation at IU (Indana University)

http://cgi.cs.indiana.edu/~oleykin/website/OpenCVHelp/
http://cgi.cs.indiana.edu/~oleykin/website/OpenCVHelp/ref/OpenCVRef_CxCore.htm#decl_cvXorS

Updated by James Bowman almost 15 years ago

Extra line removed from Python in r2939.

  • Status changed from Open to Done
  • (deleted custom field) set to fixed

Also available in: Atom PDF