Live video feed error message in simulink - simulink

I tried to run a live video feed using simulink and after connecting the "from video device" block to the "display" block and running it, I received this message
Truncating signals shown by 'untitled/Display'. Displays can only show at most 200 elements of a vector or [20x10] elements of a matrix signal
Can you guys help me fix it?

You should use something like "Video Viewer" block to see the video feed. Display block is used to see raw numbers and is limited to showing smaller set of input data if it is large.
The Video Viewer block is available with Computer Vision System toolbox in the Sinks library.

Related

How can I upload Kayaking or Rowing data via a TCX formatted file to Strava?

I'm recording workouts with a Flutter based mobile application. I can successfully upload bike workouts. https://github.com/BirdyF/strava_flutter/blob/master/lib/Models/activity.dart#L916 lists a pretty wide variety of sports. However I already noticed that "VirtualRide" reverts to a regular bike ride once it is uploaded to Strava.
Now as I'm uploading Kayaking data it also shows up as a bike ride as well (in the middle of a small lake). But at least it has the speed and the rpm (which is actually strokes per minute for kayaking). However if I switch that activity over to Kayaking on Strava's UI Strava stops showing the pace (speed) and the rpm.
I peeked at https://github.com/sanderroosendaal/rowingdata/blob/master/rowingdata/writetcx.py and that seems to output the rowing activities as "Other" sport. Its tests contain such TCXs as well. I just cannot believe TCX would be so limited. Does anyone have a pointer for me to solve this?
I'm outputting TCX because it's a textual format so it's easier to interpolate and debug than a binary FIT format. Since I can gzip it for upload its size is OK as well when compressed.
It seems that TCX is too limited file format with respect to sport selection. I develop FIT file based upload and that is able to carry Kayaking and many more sports.

how to record the voip call using sipsorcery sdk?

I am using sample programs provided by sipsorcery:
https://github.com/sipsorcery/sipsorcery/tree/master/sipsorcery-softphonev2
What I want to record the call or record the part of one side spoken text, process it, then generate the answer test and speak it back.
What I need right now to process the spoken text. I wanted to record the parts of call and save them to a wav file and generate text from it. but it seems to me that I am doing wrong. I am not able to generate the correct wav file using the provided method of sipsorcery SDK.
I have tried to follow the example on this forum as well, but it didn't work
https://markheath.net/post/how-to-record-and-play-audio-at-same
I expect that this should work using a small temporary wave file at each time the user speaks a sentence and response back again playing back the processed response file.
Any guidance how can I achieve this sense of interception and processing of the call?
Thanks,
Vivek
This example should be pretty close to what you need. It plays the audio (only ulaw support) via the default speaker using NAudio. To record it should be a matter of switching from using NAudio playback to saving to a wav file.

Displaying IP Cam Feed in MATLAB GUI

I am trying to display an IP Camera live feed in a MATLAB GUI. I am using the MATLAB IPCam Addon. I can successfully preview the live feed in MATLAB as follows:
cam = ipcam('url');
preview(cam);
However, I am unable to get the live feed in a GUI Axes. I was able to get a snapshot to display by adding the following code to the OpeningFcn of my GUI.
cam = ipcam('http://192.168.43.1:8080/video'); hImage=image(snapshot(cam),'Parent',handles.axes2);
However, when I replace the snapshot(cam) with preview(cam) to get a live feed instead of a single static snapshot, I get an error
the data type of image is invalid
The preview function does not apply to ipcam objects. Instead, its preview is a sub object that you should call, try the below instead:
cam = ipcam('url');
cam.preview;
Furthermore, the URL to stream live feed varies with the ipcam used. In my case, the URL is: http://192.168.1.70/cgi-bin/hi3510/mjpegstream.cgi?-chn=11&-usr=admin&-pwd=admin
I found a small list of functions here: https://www.instar.com/faq_cgi_hd
Hope this helps.

standard test videos for video processing

So.. In image processing, lena is the standard image for testing out algorithms in the research community. Similarly.. Are there any standard videos for testing out MATLAB codes for video processing?
There are also commonly used video sequences – though to a degree it depends on the type of video algorithm you're developing (reflected in the level of motion, type of motion, resolution etc.) and the file type you want (e.g. YUV, compressed).
As a starting point, foreman.yuv, Carphone.yuv, akiyo.yuv, bus.yuv, coastguard.yuv, flower.yuv.
For example googling the above turned up a reasonable looking repositories at the following:
YUV Video Sequences – ASU
Derf's Test Video Collection at xiph.org
Lately, the Blender clips Big Buck Bunny, Tears of Steel and Sintel have been more frequently used, as they are available in HD and 4K resolutions as well as in stereo 3D.
/Too long for a comment/
I came across some builtin sample/demo files in a matlab blog post: http://blogs.mathworks.com/loren/2007/01/10/colormap-manipulations/
Apparently the files clown and cameraman are builtin and you can just load them using load clown or load cameraman.
It depends however on the installed toolboxes: clown is from the wavelet toolbox and cameraman from the image processing toolbox. They both can be found on the matlab path of course, so you can always look around there. You'll also there find the files: autumn, board, canoe, cell, circbw, circuit,...
EDIT: also: http://www.mathworks.com/matlabcentral/answers/1376-finding-example-images-in-the-distribution
But for video I personally haven't seen anything like that in matlab
EDIT2:
I stand corrected: in the vision toolbox, there are some example videos, in the visiondemos subdirectory of the toolbox. Just search for avi files on the matlab install directory

Record audio, add effects, then save result to a audio file

I am having trouble doing what the title said. My goal is to be able to add any desired effects to your recording, save the modified audio, then send that to a server.
I have searched the fourms and came across these threads:
viewtopic.php?f=7&t=13029&p=45362&hilit=saving#p45362
viewtopic.php?f=7&t=12660&p=44586&hilit=saving#p44586
viewtopic.php?f=7&t=13178&p=45746&hilit=saving#p45746
After reading those, I see it is possible to save the modified audio, but can it only be saved as a wav? Like I said after it is saved it will be sent to a server, so size is a big deal and wavs are relatively big compared to other formats. Ignoring that fact, I tried to implement FMOD_OUTPUTTYPE_WAVWRITER and I cannot get that to work; are there any good examples of using it? I looked though the examples in the library but I didn't see any..
But the basic structure of the app is to record, turn some switches off and on to see what filters you want, preview it, then press a button "Save" that will save it. What would this save function consist of?
Any help appreciated, thanks.
Using FMOD_OUTPUTTYPE_WAVWRITER is fairly straight forward, you set the type via System::setOutput, specify the output file via System::init extradriverdata. The extradriverdata should be an absolute path to a writable area of the device such as the documents directory. After you have finished playing, call System::release and the file will be complete.
The other option for recording wave data with effects is by creating a custom DSP and connecting it to the channel playing the recorded data. You will then get regular callbacks giving you float data that you must write out to disk yourself. You can find examples of DSPs and writing wav files in the dsp_custom and recordtodisk examples respectively.
Finally note that FMOD doesn't come with the facility to write compressed audio to disk, you will need another API to achieve this goal.
You can save as an AAC file via the ExtAudioFile API.