This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IWR1642BOOST: Whcih demo to use to count people passing a line.

Part Number: IWR1642BOOST
Other Parts Discussed in Thread: IWR1642

Hello,

So I'm currently working with an IWR1642 Sensor, and I'm using it with the purpose of counting the flow of people into a room. While the provided people counting demo works, for people counting already inside the room, I was thinking of altering one of the many available demos to create a people influx counter. 

What I was thinking is to count everytime one of the clusters in the people counting demo crosses a line to say it is inside or outside the room (e.g., if position of it in timestamp-1 is behind the line and timestamp is has crossed, the counter would increase). The same thing for the other direction, if clusters passed from the inside to the outside, it would decrease the counter. My question is what would be the best demo to gather the position and centroids of the clusters I can easily work upon those? This people counting demo has the number of people detected, but the clusters don't have the centroid position if I am not mistaken.

I'll try to provide more info if needed, thank you for your time.

  • Hi Nuno,

    The People Counting Demo is going to be your best bet here. The device passes the post-processed object data over to Matlab which plots it in the visualizer. With just some simple alteration of the Matlab code you can use the object data for each of the "clusters" to determine their position and whether or not the have crossed the line. The centroid of these clusters is recorded in the object data in x and y coordinates.

    The Automated Doors lab uses the People Counting Software with an altered Matlab Visualizer in similar fashion.


    Cheers,
    Akash
  • Hello Akash,

    I'm wondering if by changing the code in main_pplcount_viz.m it updates when I run the .exe in the quickstart. Because I was trying to make a simple file write of the current people counting number and it doesn't seem to update. What do I mean is, if I change the code in the .m file it also changes the behaviour of the ppl_count.exe file.

    Thank you for your help.
  • Also another question is that I suppose that I can't edit and run the main_pplcount_viz.m in 2018a, because whenever I run it, I get some kind of error regarding figure handles.
  • Hi Nuno,

    If you are editing the .m file you will need to recompile the executable using the Matlab Runtime mcc function in order to create a new .exe file.

    The Matlab Gui's have been compiled using Matlab 2017a. This might explain why there is an error but we are unclear on what the error specifically is. We'll require more information in order to assist you.


    Cheers,
    Akash
  • So I have compiled the program using the prj file you supply, and the current problem is. After first start I get this error 

    'popupmenu' control requires a non-empty Character vector
    Control will not be rendered until all of its parameter values are valid
    > In uiwait (line 81)
    In setup>setup_OpeningFcn (line 84)
    In gui_mainfcn (line 220)
    In setup (line 40)
    In main_pplcount_viz (line 28)

    and when I try to click on the connect in the GUI

    No appropriate method, property, or field 'UserData' for class 'matlab.graphics.GraphicsPlaceholder'.

    Error in setup>btnConnect_Callback (line 264)


    Error in gui_mainfcn (line 95)


    Error in setup (line 42)


    Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)setup('btnConnect_Callback',hObject,eventdata,guidata(hObject))

    Error using uiwait (line 81)
    Error while evaluating UIControl Callback.

    This is the error that is given to me. What is weird is that is the same error when compiled with 2017a or 2018a, and it says that there are some p files missing while compiling. Dunno what I'm doing wrong

  • Would you be able to post a screenshot of both your matlab and gui?


    Cheers,
    Akash
  • I managed to bypass this issue by using the version 2_4_0 of the industrial toolbox. This one allows running directly from the .m file without errors. The question I now have is where to find the trajectory (top plot of the GUI) that is plotted for each trackID. I was thinking of checking whenever this trajectory crossed a line to count as one more people in the room (or remove, depending on the atan2 function of the closest two points of the trajectory).

  • Hi Nuno,

    This is a very good question but is outside the scope of what I can answer. If you open up a new thread we can have our People Counting Expert take a look at it.


    Cheers,
    Akash
  • Thank you for the update, I might need some help of the people counting expert in the future, since I want to know if it was possible to run the people tracking demo without a GUI (since I managed to finally count the entrance of people in the room, but I would like the counting to happen in background, without spending resources).