Search Results

Search found 2 results on 1 pages for 'gemm'.

Page 1/1 | 1 

  • Mat matrix multiplication, openCV?

    - by facebook-1593205594
    I initialized two Mat images as: Mat ft=Mat::zeros(src.rows,src.cols,CV_32FC1),h=Mat::zeros(src.rows,src.cols,CV_32FC1); and then i have some calculations: ft has fourier transform stored for an image, and h has matrix for Laplacian filtering in fourier domain.......they both have same dimensions, and then i did multiplication of them using both h*ft and gemm(h,ft,1,NULL,0,temp); function call but while executing it shows some problems..... it reads like this: opencv error assertion failed (some long code and at last says something about gemm in ....matmul.cpp)......termination called after throwing exception of 'cv::exception'

    Read the article

  • Primitive type 'short' - casting in Java

    - by gemm
    Hello, I have a question about the primitive type 'short' in Java. I am using JDK 1.6. If I have the following: short a = 2; short b = 3; short c = a + b; the compiler does not want to compile - it says that it "cannot convert from int to short" and suggests that I make a cast to short, so this: short c = (short) (a + b); really works. But my question is why do I need to cast? The values of a and b are in the range of short - the range of short values is {-32,768, 32767}. I also need to cast when I want to perform the operations -, *, / (I haven't checked for others). If I do the same for primitive type int, I do not need to cast aa+bb to int. The following works fine: int aa = 2; int bb = 3; int cc = aa +bb; I discovered this while designing a class where I needed to add two variables of type short, and the compiler wanted me to make a cast. If I do this with two variables of type int, I don't need to cast. Thank you very much in advance. A small remark: the same thing also happens with the primitive type byte. So, this workes: byte a = 2; byte b = 3; byte c = (byte) (a + b); but this not: byte a = 2; byte b = 3; byte c = a + b; For long, float, double, and int, there is no need to cast. Only for short and byte values.

    Read the article

1