Convert long to float32 matrix for precise math operations


    Mar 23 2013 | 11:47 am
    Hi! How to convert any matrix to float32 when the dimensions are changing? For example output from cv.jit.blobs.bounds. Thanks for any help

    • Mar 23 2013 | 11:50 am
      for example treat this patch as a source of long matrix. how to convert it to float32?
    • Mar 23 2013 | 12:18 pm
      why don't you use float32 directly ? anyway, you can push your matrix in another one to convert it implicitely.
    • Mar 23 2013 | 12:20 pm
      thats so easy ;)
    • Mar 23 2013 | 12:23 pm
      hey hey, i didnt see that, you pass the dim atribute. in my case the source of matrix is cv.jit.blobs.bounds and i am trying to found way to adapt float32 matrix without changing type and using matrixinfo for getting input dim..
    • Mar 23 2013 | 12:27 pm
      matrixinfo just gives .. infos.
      I don't really understand what you are trying to do
    • Mar 23 2013 | 12:32 pm
      i am getting the coordinates of blobs and would like to scale it from 0..320, 0..240 to -1..1, -1..1 something like this, but in more elegant way.
    • Mar 23 2013 | 12:34 pm
      ok nevermind, cv.jit.blobs.centroids outputs flot32 :))
    • Mar 23 2013 | 12:35 pm
      omg!
      anyway, check the parameter adapt in jit.matrix
    • Mar 23 2013 | 12:35 pm
      it is changing type also..