Harsh00988
After using findContours function I am getting an output but i only want to access the elements inside it one by one
After using the finContours function I got an output which is shown in the image. How can i access them one by one so that i could pass them inside my show function which takes areguments like this:
show(%Evision.Mat{channels: _, dims: _, raw_type: _, ref: image, shape: _, type: _})
Can someone help me out?
Marked As Solved
benwilson512
Author of Craft GraphQL APIs in Elixir with Absinthe
Hi @Harsh00988, next time please copy and paste the values here instead of using a screenshot.
It looks like the return value is a tuple, where the first element is your list of data, and the rest of it can’t be seen in your screen shot. Try pattern matching out the list or using elem/2 to extract the list from the tuple.
0
Also Liked
benwilson512
Author of Craft GraphQL APIs in Elixir with Absinthe
If you have that value bound to a variable result you can do
{items, _} = result
items will be a list of things at that point.
P.S I made a small edit to your post to put the code in ` so that it formats more nicely.
1
Last Post!
swetha
Popular in Questions
Hello, how can I check the Phoenix version ?
Thanks !
New
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Hi guys, i’m new in the Elixir world, and i have to say, that i love it!
i’m having some problem to understand anonymous functions with ...
New
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum.
...
New
Hello all!
I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
Other popular topics
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum.
...
New
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
If I have a post route which an argument:
post /my_post_route/:my_param1, MyController.my_post_handler
How would get the post params ...
New
What learn first? Rust or Elixir
Hi Elixir community!
I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
15:22:35.803 [error] gen_event {lager_file_backend...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security











