qooxdoo : Show FPS on screen ? - qooxdoo

Simple question : How to show Frame Per Second ( fps ) on screen , e.g. on a qx.ui.basic.Label ?
Further question, how to limit FPS to 30 ?
Note: I'm using qx.Desktop .

qooxdoo does not offer such a functionality. You can try to calculate the FPS yourself but I would not trust on that because the measurement could influence the frame rate. I use the fps counter on chrome for that:
http://www.mobitechie.com/browser/how-to-enable-fps-counter-on-chrome-brower/

Related

Set webcam grabbing resolution with ImageIO in Python

Using simple Windows/Python to read from Webcam:
camera = iio.get_reader("<video0>")
screenshot = camera.get_data(0)
camera.close()
I'm getting a default resolution of 1980x1920. The webcam had different, larger resolutions available. How do I set that UP?
ALSO -
How do I set exposure time? image comes out pretty dark.
Thanks
You can set the resolution via the size kwarg, e.g. size=(1280, 720)
My webcam is my third device and the resolution defaults to 640x360 but has 1280x720 available, so I would do something like:
import imageio.v3 as iio
frame = iio.imread("<video2>", index=0, size=(1280, 720))
On a tangent, I'd also suggest switching to the easier iio.imiter for stream reading. It tends to produce cleaner code than the old iio.get_reader syntax.
import imageio.v3 as iio
for idx, frame in enumerate(iio.imiter("<video0>", size=(1980, 1920))):
... # do something with the frame
if idx == 9:
# read 10 frames
break
Response to your edit:
Setting webcam exposure is a question that actually hasn't come up yet. Webcams typically feature automatic brightness adjustment, but that might take a few frames depending on the webcam's quality.
Manual adjustment might already be possible and I just don't know about it (never looked into it). This is a separate question though and is probably better tracked as a new issue over at the ImageIO repo.

Is there any way to shorten ReactPlayer progress interval

I'm using react-player for a project
<ReactPlayer
ref={p => { this.playerRef = p }}
controls={false}
muted={false}
volume={this.getVolume()}
url="https://vimeo.com/258944633"
progressInterval={30}
playing={this.state.playing}
onStart={this.setStateVidDuration}
onProgress={this.handleProgress}
height="100%"
width={"100%"}
/>
And I'm trying to do a facial recognition overlay based on what frame the video is on. The only way I have to access anything close to the current frame is the onProgress call, and I can set the interval with onProgressInterval. It returns a fraction played which could work for my purposes (not ideal but whatever). Docs here: https://www.npmjs.com/package/react-player
The problem is it currently only runs every 250 ms regardless of what I set onProgressInterval to.
When I read the vimeo player Docs I found that the minimum interval I found matched up with what is suggested in the Docs https://github.com/vimeo/player.js/#timeupdate
Is there any way to get it to tick faster? Even twice as fast would make a big difference.
I am also considering a hacky solution where I updated the real fraction played on each tick and set a smaller interval in between the onProgress ticks where I used the frame rate to estimate the additional frames that have passed since I got the last real reading from the onProgress call.
Edit: It ticks at minimum 250ms when I set it lower than 250 to be clear.

Increase Intensity of SCNLights

Hello I have a SCNScene that is the basis of my game. The lighting was tricky and to get the effect I wanted I ended up duplicating three lights three times. This increased the intensity of the lights to create the affect and colors I wanted. However I know that 9 lights all casting shadows has been taking a toll on my fps. Is there any way to increase the intensity of the lights like i did by duplicating them without destroying my fps?
Thanks!
what type of light do you have ? Do they have non-default attenuation values ? (see attenuationStartDistance, attenuationEndDistance and attenuationFalloffExponent).
You can try to increase the brightness of your lights colors if that's possible (if they're aren't already 100% white for instance).
Otherwise you can use shader modifiers. The SCNShaderModifierEntryPointLightingModel entry point will let you customize the effect of each light.
In iOS 10 & macOS 10.12, SCNLight now has an intensity: CGFloat property which'll let you multiply the brightness of each light.  Assuming you're not using PBR/IES, intensity acts as a permille multiplier— 1000 = 1×, 3000 = 3×, 100 = 0.1×, etc.  (When using PBR or IES lighting, intensity instead controls the luminous flux of the light.)
To triple the brightness of each SCNLight, simply do:
myLight1.intensity = 3000

MediaElement takes too much time during loading

i am new to wpf. i am using MediaElement for display video from web. Everything is works well Except it takes too much time before loading. i use following code for set source and play the video
Path_MediaPlayer.Source = new Uri(_videoPath, UriKind.RelativeOrAbsolute);
if (!IsVideoStart)
{
progressImage.Visibility = Visibility.Visible;
this.UpdateLayout();
}
Path_MediaPlayer.Play();
Original file size is around 85 MB. It takes around 7-10 minute to load data in buffer and after that it start. However once it play the video, then it takes less time to buffering data(around 30 sec.). So i want to ask that how can i minimize the first load time.

Does The Windows Phone 7 Emulator Show A Watermark?

Does the Windows Phone 7 emulator show a watermark along the upper right edge of the display?
At first I thought it might be nested grids not overlapping properly and creating a thin vertical column of visual garbage in the upper right. But after creating a new project and zooming in on both garbage areas it turns out they are numbers.
Existing project: "000 000 000006 001 000 00.0000"
New, empty project: "000 000 003296 002 001 00.0967"
What are these? Any way to disable their visibility?
These are frame rate counters used for measuring performance. Details here.
Jeff Wilcox – Frame rate counters in Windows Phone
The post also shows how to disable their display.
In the App constructor in App.xaml.cs is generated code. Comment out these lines, like so:
public App()
{
UnhandledException += Application_UnhandledException;
// Uncomment to show graphics profiling information while debugging.
if (System.Diagnostics.Debugger.IsAttached)
{
// Display the current frame rate counters.
//Application.Current.Host.Settings.EnableFrameRateCounter = true;
// Show the areas of the app that are being redrawn in each frame.
//Application.Current.Host.Settings.EnableRedrawRegions = true;
// Enable non-production analysis visualization mode,
// which shows areas of a page that are being GPU accelerated with a colored overlay.
//Application.Current.Host.Settings.EnableCacheVisualization = true;
}

Resources