-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update/ion kit 1.0.0 #6
Update/ion kit 1.0.0 #6
Conversation
cpp/src/tutorial1_display.cpp
Outdated
@@ -133,7 +98,6 @@ int main(int argc, char *argv[]) | |||
int ret = video<uint16_t>(width, height, pixelformat, num_device); | |||
} | |||
|
|||
|
|||
}catch(std::exception& e){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should catch ion::Error additionally to std::exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 87d09cf
cpp/src/tutorial1_display.cpp
Outdated
// JIT compilation and execution of pipelines with Builder. | ||
try { | ||
b.run(pm); | ||
b.run(); | ||
}catch(std::exception& e){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can delete try-catch from here and delegate to outermost try-catch block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in a85a0a5
python/tutorial1_display.py
Outdated
# running the builder | ||
builder.run(port_map) | ||
builder.run() | ||
output_bytes = outputs[0].read(output_byte_size) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read
is no longer needed. You can create ion.Buffer passing numpy array (Buffer(array=numpy_array)
) and you can access data through numpy array without ion.Buffer.read/write
operation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 24b9ed0
…sing-dev-tutorials into update/ion-kit-1.0.0
python/tutorial1_display.py
Outdated
port_map.set_buffer(gain_p, gains) | ||
port_map.set_buffer(exposuretime_p, exposures) | ||
port_map.set_buffer_array(output_p, outputs) | ||
output_p[0].bind(outputs[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after pull fixstars/ion-kit#207
you can use output_p.bind(outputs)
Update tutorial code for ion-kit 1.0.0
C++
Python
Note: Python binding issues are still under fixing at (fixstars/ion-kit#206 and fixstars/ion-kit#205)
Added tutorial code for ion-kit 1.0.0
C++
Python