DSPRelated.com
Forums
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →

Upper bound for realtime application

Started by Unknown ●June 10, 2014
On Tue, 10 Jun 2014 23:00:01 +0100, Tom Gardner wrote:

> On 10/06/14 22:13, Raphael Küster wrote: >> Hi >> >> I have developped an application for image inpainting. Now I want to >> claim that it can be used for realtime purposes. >> >> Does somebody know a paper which gives some boundaries for realtime >> applications? I want to refer to a paper to prove my assumption. > > Realtime implies the computation completes within a certain time, T. > Hard realtime means that T is guaranteed and somebody dies if the > guarantee isn't met. > > Soft realtime means that it is guaranteed on average, where the > averaging interval is specified. (Yes, I simplify)
That's not a useful definition if something takes one second to execute 99 times, and then 101 seconds the 100th -- yes, the average is 2 seconds, but... You also want to be wary of anything that's data-dependent. If the average execution time is 2 seconds, but the execution time _always_ goes up to 10 seconds any time "lena" is in view (I linger over her pictures, too), then that's going to suck big ones. A much more useful "soft realtime" metric for me is how often the time exceeds T, and how many times in a row -- there's a lot of apps that can handle the occasional missed deadline, as long as it's bracketed by successes.
> If you can't guarantee either of those the you don't have a realtime > computation.
Yea verily.
> So, define the time T for your computation. It is then up to the > customer to determine whether their application can tolerate a > repetition frequency of 1/T.
There's a catchphrase in real-time circles: "Real Fast is not Real Time". Real time is about meeting the deadlines, not about how fast you can be on average. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On Tue, 10 Jun 2014 14:55:49 -0700, HelveticusMaximus wrote:

>> Can you give some hints as to the computation involved? > > It is sparse coding with dictionary learning using matching pursuit > algorithm.
I don't know what the hell any of that means other than maybe "sparse" -- which makes me think of sparse matrices, which speed up computation times for some data sets and operations, and slow it down for others. If that's what you've got -- something that's good and fast most of the time, but which will bog way down for some images -- then it's not going to be an easy fit into "real time". -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Tim Wescott <tim@seemywebsite.really> writes:

> On Tue, 10 Jun 2014 23:00:01 +0100, Tom Gardner wrote: > >> On 10/06/14 22:13, Raphael K&uuml;ster wrote: >>> Hi >>> >>> I have developped an application for image inpainting. Now I want to >>> claim that it can be used for realtime purposes. >>> >>> Does somebody know a paper which gives some boundaries for realtime >>> applications? I want to refer to a paper to prove my assumption. >> >> Realtime implies the computation completes within a certain time, T. >> Hard realtime means that T is guaranteed and somebody dies if the >> guarantee isn't met. >> >> Soft realtime means that it is guaranteed on average, where the >> averaging interval is specified. (Yes, I simplify) > > That's not a useful definition if something takes one second to execute > 99 times, and then 101 seconds the 100th -- yes, the average is 2 > seconds, but... > > You also want to be wary of anything that's data-dependent. If the > average execution time is 2 seconds, but the execution time _always_ goes > up to 10 seconds any time "lena" is in view (I linger over her pictures, > too), then that's going to suck big ones. > > A much more useful "soft realtime" metric for me is how often the time > exceeds T, and how many times in a row -- there's a lot of apps that can > handle the occasional missed deadline, as long as it's bracketed by > successes. > >> If you can't guarantee either of those the you don't have a realtime >> computation. > > Yea verily. > >> So, define the time T for your computation. It is then up to the >> customer to determine whether their application can tolerate a >> repetition frequency of 1/T. > > There's a catchphrase in real-time circles: "Real Fast is not Real > Time". Real time is about meeting the deadlines, not about how fast you > can be on average.
You guys want to be so ANAL about everything! Sheesh!!! Like people should use real definitions and industry standards... -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
i might suggest taking a look at the wikipedia article about "real-time 
computing". https://en.wikipedia.org/wiki/Real-time_computing

there is a variation in the definition for the case of continuous-input, 
continuous-output (the "DSP" definition).

Raph, if your application is set up to process images as fast as they 
are thrown at it, then it's real-time.  but if it takes *more* time to 
process the images than the average (or, worst case, depends on the 
buffering) time between images being input, then it's not real-time. 
you've mentioned that it takes about "1.5s per image" to process.  if 
images are being input to the process at a rate slower than 2/3 image 
per second, then your application can process images in real-time.  but 
if your image rate is faster than 2/3 image per second, then your 
process is not real-time.

i guess that would be closer to the "soft real-time" definition, but 
it's really not either.  if latency is not an issue, then "soft" is the 
definition.  but if there is a hard limit on the latency, then "hard" is 
the definition.


On 6/10/14 6:00 PM, Tom Gardner wrote:
> On 10/06/14 22:13, Raphael K&#4294967295;ster wrote: >> Hi >> >> I have developped an application for image inpainting. Now I want to >> claim that it can be used for realtime purposes. >> >> Does somebody know a paper which gives some boundaries for realtime >> applications? I want to refer to a paper to prove my assumption. > > Realtime implies the computation completes within a certain time, T. > Hard realtime means that T is guaranteed and somebody dies if the > guarantee isn't met. > Soft realtime means that it is guaranteed on average, where the > averaging interval is specified. (Yes, I simplify) > > If you can't guarantee either of those the you don't have a > realtime computation. > > So, define the time T for your computation. It is then up to the > customer to determine whether their application can tolerate a > repetition frequency of 1/T. > > You had better specify the /all/ conditions under which you guarantee > time T - which is surprisingly difficult.
-- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
robert bristow-johnson <rbj@audioimagination.com> writes:

> i might suggest taking a look at the wikipedia article about > "real-time computing". > https://en.wikipedia.org/wiki/Real-time_computing > > there is a variation in the definition for the case of > continuous-input, continuous-output (the "DSP" definition). > > Raph, if your application is set up to process images as fast as they > are thrown at it, then it's real-time. but if it takes *more* time to > process the images than the average (or, worst case, depends on the > buffering) time between images being input, then it's not real-time. > you've mentioned that it takes about "1.5s per image" to process. if > images are being input to the process at a rate slower than 2/3 image > per second, then your application can process images in real-time. > but if your image rate is faster than 2/3 image per second, then your > process is not real-time. > > i guess that would be closer to the "soft real-time" definition, but > it's really not either. if latency is not an issue, then "soft" is > the definition. but if there is a hard limit on the latency, then > "hard" is the definition.
The wikipedia article says "real-time DSP" can have delay (latency). I'm not sure I would split the DSP/non-DSP real-time hair. I would consider latency a separate issue from real-time. That is, if the time required to process an event is less than or equal to the event period, you're real-time, even if it takes a week to come out the pipe. --Randy
> > > On 6/10/14 6:00 PM, Tom Gardner wrote: >> On 10/06/14 22:13, Raphael K&uuml;ster wrote: >>> Hi >>> >>> I have developped an application for image inpainting. Now I want to >>> claim that it can be used for realtime purposes. >>> >>> Does somebody know a paper which gives some boundaries for realtime >>> applications? I want to refer to a paper to prove my assumption. >> >> Realtime implies the computation completes within a certain time, T. >> Hard realtime means that T is guaranteed and somebody dies if the >> guarantee isn't met. >> Soft realtime means that it is guaranteed on average, where the >> averaging interval is specified. (Yes, I simplify) >> >> If you can't guarantee either of those the you don't have a >> realtime computation. >> >> So, define the time T for your computation. It is then up to the >> customer to determine whether their application can tolerate a >> repetition frequency of 1/T. >> >> You had better specify the /all/ conditions under which you guarantee >> time T - which is surprisingly difficult.
-- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Am Mittwoch, 11. Juni 2014 06:16:42 UTC+2 schrieb robert bristow-johnson:
> Raph, if your application is set up to process images as fast as they > > are thrown at it, then it's real-time. but if it takes *more* time to > > process the images than the average (or, worst case, depends on the > > buffering) time between images being input, then it's not real-time. > > you've mentioned that it takes about "1.5s per image" to process. if > > images are being input to the process at a rate slower than 2/3 image > > per second, then your application can process images in real-time. but > > if your image rate is faster than 2/3 image per second, then your > > process is not real-time.
Why 2/3 images per second?
"Raphael K&#4294967295;ster" <HelveticusMaximus@gmx.ch> wrote in message 
news:b83c6673-0ffc-4bdb-a5a0-e842f5483ec9@googlegroups.com...
> I have developped an application for image inpainting. Now I want to claim > that it can be used for realtime purposes.
if you dont know what real time means why do you want to claim it?
Randy Yates wrote:
> Tim Wescott <tim@seemywebsite.really> writes: >
<snip>
> > You guys want to be so ANAL about everything! Sheesh!!! Like people > should use real definitions and industry standards... >
Just think how much better things would be if design documentation took the form of epic poetry! -- Les Cargill
On 6/10/14 5:55 PM, HelveticusMaximus@gmx.ch wrote:
> ... > I know how much it takes for my algorithm to compute. I takes around 1.5s per image.
On 6/11/14 3:52 AM, HelveticusMaximus@gmx.ch wrote:
> > Am Mittwoch, 11. Juni 2014 06:16:42 UTC+2 schrieb robert bristow-johnson: >> >> Raph, if your application is set up to process images as fast as they >> are thrown at it, then it's real-time. but if it takes *more* time to >> process the images than the average (or, worst case, depends on the >> buffering) time between images being input, then it's not real-time. >> you've mentioned that it takes about "1.5s per image" to process. if >> images are being input to the process at a rate slower than 2/3 image >> per second, then your application can process images in real-time. but >> if your image rate is faster than 2/3 image per second, then your >> process is not real-time. > > Why 2/3 images per second?
for whatever reason it's 3/2 seconds per image. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On 6/11/14 12:30 AM, Randy Yates wrote:
> robert bristow-johnson<rbj@audioimagination.com> writes: > >> i might suggest taking a look at the wikipedia article about >> "real-time computing". >> https://en.wikipedia.org/wiki/Real-time_computing >> >> there is a variation in the definition for the case of >> continuous-input, continuous-output (the "DSP" definition). >> >> Raph, if your application is set up to process images as fast as they >> are thrown at it, then it's real-time. but if it takes *more* time to >> process the images than the average (or, worst case, depends on the >> buffering) time between images being input, then it's not real-time. >> you've mentioned that it takes about "1.5s per image" to process. if >> images are being input to the process at a rate slower than 2/3 image >> per second, then your application can process images in real-time. >> but if your image rate is faster than 2/3 image per second, then your >> process is not real-time. >> >> i guess that would be closer to the "soft real-time" definition, but >> it's really not either. if latency is not an issue, then "soft" is >> the definition. but if there is a hard limit on the latency, then >> "hard" is the definition. > > The wikipedia article says "real-time DSP" can have delay (latency).
but that the latency is *bounded* by some unspecified finite value. it ain't real-time DSP if the output gets further and further behind the input.
> > I'm not sure I would split the DSP/non-DSP real-time hair. I would > consider latency a separate issue from real-time. That is, if the time > required to process an event is less than or equal to the event period, > you're real-time, even if it takes a week to come out the pipe.
well, that's the "Real-time in DSP" definition there. but the Hard Real-time guys would say that ain't good enough. if you have an object recognition algorithm in an image processor connected to a robotic arm that's intended to pick up that object, a week of latency might not be good enough for that algorithm to be useful. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."