jzbontar / mc-cnn

Stereo Matching by Training a Convolutional Neural Network to Compare Image Patches
BSD 2-Clause "Simplified" License
707 stars 232 forks source link

about adcensus.cu #29

Open wensihan opened 7 years ago

wensihan commented 7 years ago

I am writting a post-processing program named cbca_post in adcensus.cu, but it always give an error which described as "attempt to call field 'cbca_post (a nil value)' ". And when I try to change the name of cbca to cbca_pre, didn't modify the content of cbca, it also appear the same problem. What should I do if I want to add a code to the adcensus.cu? Really looking forward to you reply~

jzbontar commented 7 years ago

To add a function to adcensus.cu, do the following:

  1. Create a function in adcensus.cu like so: int foo(lua_State *L)
  2. Add it to the list of functions.
  3. Recompile adcensus.so by running make.
  4. Call the function from lua in main.lua like so: adcensus.foo(...)
wensihan commented 7 years ago

Thank you very much~ I ignored the steps of 2 and 3...