I am creating simple application for altering an image projected by projector.
I would like that projected image to be different than the desktop.
Consider simple example. My application would take a print-screen and add some bitmap to it. Than it will displayed on the projector. While original image on notebook monitor is the same, the projected image will contain this added bitmap.
I am using GDI for altering image the image in C++/CLI, and Windows Forms.
You just create two windows, and position one such that it's on the secondary display, and one such that it's on the primary display. There's nothing "magical" about the second monitor you have to mess with.
I'll add to what Billy said, and provide information that you should use Screens collection for that. It will give you exact coordinates of each screen that is available on the system.
More info here:
http://msdn.microsoft.com/en-us/library/system.windows.forms.screen.aspx
Related
I wouldn't ask if I had not searched a way for the whole day - so my problem is, that i have multiple raster files (>300) that show different flooding of cells in each iteration step (so not strictly a time series, but close). I want to display the results on a hillshade (that remains the same) of every raster and export it to a png. My goal is to animate them using one layout in ArcGIS Pro, where only the active raster layer should change on every export and then animate the exported png files to one GIF or video file!
How is this possible in ArcGIS Pro 2.8?? Or QGIS?
ArcGIS Pro Animation tools are not working for this scenario (because I dont have feature classes and/or time series data) and QGIS seems to only work with change of extents in Atlas (or time series with time data as well). In ArcMap there used to be a tool called Group Animation, which does exactly what i want to do ...
Any ideas? Maybe a python script? Any hints on that?
Very appreciated!
Max
I have tried out the ArcGIS Pro Animation tools which apparently need time series data or feature classes (which I dont have). QGIS Atlas also seems to only work with varying the extent of the image on every iteration...
I have a react app that has many image references ( tags <img src=... /> and css background:url(...)) type.
These images are hosted on Azure Storage.
To speed up my App loading time on various devices (desktops and mobile), I need to resize these images before they hit the client, ie, on the server somewhere.
So far, I can think of the following options:
Pick each image, and produce multiple versions of them for various standard device sizes. Then, pick up each <img src=... /> tag, and, using JS alter the image name, such that the right size of image gets served. This will not work with css.
Use Azure CDN to automatically resize images. I was hoping that resizing would happen automatically, as the CDN portal retrieves the user-agent from the device. Does anyone know if this is true?
Serve images through an Azure function, resizing them on the fly (as suggested here)
Can someone suggest other options they can think of, or a pros / con of the above.
Since you're using javascript, use the window tag. For browsers, the window tab measures the resolution of the browser and you can set the height and width of your image to window.innerHeight and window.innerWidth. There are multiple other ways to do this but this is the easiest and most optimised if your coding project needs to be efficient with the least lines of code necessary.
More info about the window object here : https://www.w3schools.com/js/js_window.asp
P.S. this is only a solution for desktop, for mobile you can use screen.width, screen.height. This might not work on desktop but on a macOS Big Sur device it works, I tried it (This might be because macOS Big Sur is like a mobile optimised interface given that you can even run iOS apps on it but we don't know unless we try). That might be a better option as it is most likely common across all your devices.
More info about the screen object here : https://www.tutorialrepublic.com/faq/how-to-detect-screen-resolution-with-javascript.php
On the off-chance that none of them are common across all of your target devices, try making a detector program with which you can detect the device type and store that in a variable. Then create 2 if statements saying
if(deviceType = iOS){
<img src=..., screen.width, screen.height/>
}else if(deviceType = Windows){
<img src=..., window.innerWidth, window.innerHeight/>
}
Obviously this code won't work but it's just there to show you the flow where you can sort of understand what I meant. You need to integrate it your own way but this was just a way to make it easier as many times people mention that my answers are not easy to understand, just as a safety measure.
The best part of these options is that instead of remade copies of the image itself, this will resize the one, which saves storage space and eliminates the chance of the user using an unexpected display output like a 49" Samsung Odyssey G9 monitor where the resolution is extremely far from what you might have expected and resized. This also means you don't have to create a separate file just to make image resizing code, just the one to detect the OS (not necessary if the screen object works) which would've already been done since this is Azure we're talking about and they always detect their user base.
If you have any queries, please reply back.
Good luck!
I'm looking for sample code, or getting started to perform a "green screen" with the latest Azure Kinect DK.
How should I proceed to build and display a color stream with ONLY body area ?
Is it possible to avoid using body stream ? Because it require a stronger (NVidia computer)
We just published the new Green screen code sample as part of our GitHub open source repo microsoft/Azure-Kinect-Sensor-SDK.
You can find more information at green screen example
If you have any questions about the code, you can open GitHub issue.
I just received my Azure Kinect device recently and have not yet tried a few things I am interested in so this reply comes not from direct experience, however sample code and the SDK's indicate there may be a viable approach.
You can always try to implement traditional color-recognition algorithms, but if your usage scenario allows it, you can use data from the depth camera to filter only data within a depth range, with the "green screen" being out of range. You can then correlate pixels from the depth camera to the RGB image data to pick out data from the color stream that is within a certain depth range. Also, the background does not have to be a real green screen, but rather just has to be outside of the filtered depth range.
This approach allows you to use the sensor SDK, not requiring the body tracking SDK and its associated GPU requirements.
Part of the process used in my app involves taking a photo (done with Capture.capturePhoto()). The photo is then resized to a small square of 200px and finally sent to a server.
I am able to delete the resized image with FileSystemStorage.delete() however the initial photo taken with Capture.capturePhoto() cannot be deleted because of the app being sand boxed (as described in this SO question )
This can be embarrassing for the user because these photos are polluting their gallery (the photos have no value for the user).
As deleting the initial photo is not possible, I was wondering if I could force the Captured photo to be stored in cache so that it gets automatically removed by the OS.
Maybe this question could be a solution for Android but I would prefer to avoid having to go native?
Consequently is it possible with Codename one to take a photo that will only be temporary and be deleted automatically ?
Thanks a lot,
Cheers
We try to delete the file automatically but since the OS takes the photo some platforms just stick it in the gallery and there isn't much we can do there. It's literally a matter of "this works on Android device A and fails on Android device B".
Apps like snapchat etc. don't use the device camera app but instead use the low level camera API's which are more complex and flaky. At this time we don't map these API's in Codename One so if you need something with lower level control you will need to use native interfaces. This is a non-trivial API though.
I've been asked to create a stand-alone site/app that's not connected to the web (all on a local server).
One part of it is to have a map of a natural reserve with a bunch of links that will show footpaths, different animals habitat areas, visitor centres and such.
So there's a map (static picture) and when you click on it some overlay goes on top of it.
At least that's the way I see it now.
I've looked here: http://www.carto.net/williams/yosemite/ but it just looks mucho ugly.
Getting Maps Premium is not an option as it's not that cheap. And the reason they don't want to use Maps/Earth free API is because internet connection is still very slow there (sattelite internet only and when optic cable will be hooked up nobody knows).
Looking for some recommendations as to how to proceed there. Drawing paths/areas on the picture of the maps seems extremely insufficient and time consuming.
I'd need some way to use coordinates to automatically draw areas and lines over the map (and then somehow export that as a graphis file (or SVG) that'll be layered on top of original map simply using ajax.
Will ARCGIS pro edition be the way to go or should I start learning SVG. Do you know some good SVG books/tutorials (as related to mapping)? Maybe there's some other way around altogether...
They do have detailed maps of the area in ARCGIS (whatever format they are in I don't know yet).
Just looking for some ideas, any help will be appreciated. Thanks in advance.
Do you know GeoServer? More or less all-in-one, compatible with different types of datasets, widely customisable.
Starting from "raw" SVG and write the whole thing yourself will probably be prohibitively time consuming.
If you have very little data (say less than 50 geometries) that is fixed, you could also use OpenLayers without any backend server.
For the data you could use a OpenLayers.Layer.Image if your (overlay-) map consists of a small raster image. For vector data, you can use OpenLayers.Layer.Text or a OpenLayers.Layer.Vecor together with protocols OpenLayers.Layer.KML or .JSON.
You can click through the current release examples.
I admit that this is not an easy task for a beginner, but it's fun hacking the maps together.