Skip to content

cv2.PCAComputeVar's parameter 'mean' takes no effect on the result in opencv-python v2.4.13.2 ! #10433

@HawkRong

Description

@HawkRong
System information (version)
  • OpenCV => 2.4.13.2
  • Operating System / Platform => Windows 64 Bit
  • Compiler => ( installed from compiled '.whl' file )
Detailed description
'cv2.PCAComputeVar' 's parameter 'mean' takes no effect; given the same 'data', whether or not the parameter 'mean' is specified, the function returns the same result; however, 'cv2.PCACompute' gives response to the parameter 'mean'.
Steps to reproduce

import numpy
import cv2

data = numpy.random.rand( 10, 5 )
mean = numpy.arange( 0, 5 ).reshape( 1, 5 )
result_1 = cv2.PCAComputeVar( data, 0.9 ) # 'mean' not specified.
result_2 = cv2.PCAComputeVar( data, 0.9, mean ) # 'mean' specified.
print 'cv2.PCAComputeVar'
print 'without prior mean : ', result_1
print 'with prior mean : ', result_2
result_3 = cv2.PCACompute( data ) # 'mean' not specified.
result_4 = cv2.PCACompute( data, mean ) # 'mean' specified.
print 'cv2.PCACompute'
print 'without prior mean : ', result_3
print 'with prior mean : ', result_4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions