Here is the distributed mrl instances I currently have working locally. Its currently a star topology with 3 mrl instances and a web-browser client. The UI now has complete interactivity with all services on all instances. I started testing with Mrl instances having 13 clocks each, making sure I could start a clock service, and from the UI be able to start and stop the clock (control messages), while seeing the clock pulses update the UI.
If you look at the paths, you'll notice that clock pulses need to be relayed or routed from the instances "through" the admin, then too the browser. As a challenge I started opencv on mrl01 and started a capture. As you can see below ... WORKY ! .. it worked without errors, without python scripts, or special handling, I have a video feed routed from mrl01 "through" the admin to the webgui.
I'm sure there are bugs to be squashed, but initial results from my work are encouraging. I am curious how more instances in more complex topologies will work together. For example, if mrl01 started a webgui service, then another mrl instance could attach to it. Would all of its service information propegate through all of the instances?
More Tests !
Video feed from cv@mrl01 routed through another mrl instances to show on the web UI
4 instances, 4 security services, 1 webgui, 1 browser and 39 clocks ... all worky !
More progress with OpenCV webgui.
1) Web Viewer now enables and disables web viewer stream and publishing
2 & 3) Native Viewer starts and stops a Swing VideoWidget2 ... I wanted to use javacv's CanvasFrame but found it unreliable for displaying - often it would come up blank until you resized it ... i tried a variety of swing strategies to get it to work properly .. pack() invalidate() but it still was blank 50% of the time. Anyway VideoWidget2 has a nice feature of being able to trap mouse clicks in the stream (same as web viewer now)
3) I added the extra fields necessary to support the ImageFile Grabber . (4) It's a little big klunky, but you can choose a file and upload it to the mrl server to process. Additionally if you put in a URL in Path - it will fetch it and put it in the data directory then load and process it. You've got to hit the (5) upload button for the file to be uploaded - perhaps it should just be the event of selecting the file.
TODO - need to wrap up/make worky all the output controls. Then I think its just implementing the filter dialogs that are most interesting... that's my plan.
I'll merge this with webgui_work and cut a pr shortly..
There was a threading issue relating to a thread from the webgui partially updating a filter's state while the video processor thread processes the display. I fixed that simply and robustly by having the video processing thread do the update. Previously NPEs were being thrown, now - rock solid.
I'm not sure how many ones I want to create (or re-create), but it would be very helpful if Astro thought about a good uniform design. I guess its not too bad with some description what the filter does at the top, and the various controls below. Its a start anyway.
One of my favorite filters the LKOpticalTrack's Dialog is mostly functional with the major components.
I added a link in the description (bonus feature to have nice html markup to describe each dialog)
I still need to add the capability of setting a point with the mouse in the viewer. Was hoping maybe Astro could wire up a good mouse event.
So far I've done 5 filter dialogs, this was the first one which requires the setting of points using the mouse and (x,y) location of a click in the video stream view.
Now able to create masks with pngs ... I will add an easy interface to input a png with transparencies. Could possibly help with detection training.
Fun with inexpensive Fish Eye Lens !
Good stats (15 fps is what the camera does - 7ms latency ... latency also includes all the filter processing in addition to the network travel to the browser)
Update: Lots of worky stuffs !
I implemented a new way of video streaming to the webgui.
Its faster, does not require another service (like the VideoStreamer), does not require a different port (operates over the same ws connection as the rest of the gui), contains more meta information - such as latency and other arbitrary details, and uses less resources.
I got the grabber selection, camera index, grabber type and lots of other parts working.
Currently I'm working on the filter sub-dialogs and trying to find a way so that it will be easy to add the rest.
I was going to start making the UI parts of OpenCV you created actually work.
I thought I'd add a few toggle buttons for toggling on native and web screens, but when I added a <toggle and tried all the various classes all I got was this :
It looks like the toggle ui libraries' original css has been modified ?
Would it be better to leave the original css alone - and add the overriding style at the top of the service page, or if it is to be shared among multiple servicess a new css file ?
I guess I'll use miniBTN because it looks to be the only thing that will work.
What do you think?