Android Question Opencv method ConvertScalarHsv2Rgba

PABLO2013

Well-Known Member
Licensed User
Longtime User
Greetings, I want to know how to perform this method on the contrary , i need : convertScalar Rgba 2 Hsv , thanks


B4X:
Private Sub convertScalar Hsv 2 Rgba (hsvColor As OCVScalar) As OCVScalar
  
    Dim pointMatRgba As OCVMat
    pointMatRgba.Initialize
    Dim pointMatHsv As OCVMat
    pointMatHsv=pointMatHsv.zeros(1,1,mCvt.CV_8UC3)
    pointMatHsv.setTo(hsvColor)
    mImgProc.cvtColor(pointMatHsv,pointMatRgba, mImgProc.COLOR_HLS2RGB_FULL,4)
    Dim retScalar As OCVScalar
  
    Dim d() As Double=pointMatRgba.get5(0,0)
    retScalar.Set(d)
    Return retScalar
  
End Sub
 
Top