What is the field of view(FOV) of the color camera in Kinect for Windows V2? - kinect

Can't find it anywhere. The kinectforwindows site has the FOV for depth camera. I can't find it in the box either.

#user1809923 is correct. I contacted the developer of the link:
http://smeenk.com/kinect-field-of-view-comparison/
And he responded with this information:
If I remember correctly these FOV values are part of the
framedescriptions that you can retrieve with help of the Kinect SDK.
Since other people asked for the same info I will update the my blog.
I confirmed his findings by calling the frame's framedescription in the Kinect SDK code and printing the values to the screen.

According to this post
http://smeenk.com/kinect-field-of-view-comparison/
the FOV of the color camera is 84.1 x 53.8. I am not sure, where the author found this information though.

I just wanted to add some more information to this, because the official Kinect Fusion documentation is really bad and because the answer here is correct but the numbers are rounded:
assuming, you already have a initialized IColorFrameSource* (e.g. with the name pColorFrameSource) you should retrieve the information after you opened the reader: pColorFrameSource->OpenReader(&m_pColorFrameReader); with m_pColorFrameReader beeing IColorFrameReader*
the code to retrieve the FOV then looks like this:
IFrameDescription *f=nullptr;
float fovDiago = 0;
float fovHori = 0;
float fovVerti = 0;
HRESULT hh=pColorFrameSource
->CreateFrameDescription(ColorImageFormat::ColorImageFormat_Rgba,&f);
if (hh == S_OK) {
f->get_DiagonalFieldOfView(&fovDiago);
f->get_HorizontalFieldOfView(&fovHoront);
f->get_VerticalFieldOfView(&fovVerti);
}
The FOV values not rounded are:
fovDiago =91.9000015
fovHori =84.0999985
fovVerti =53.7999992

Related

Qt3D Billboards: how to make plane always face to camera

I try to use camera's viewVector to make plane face to camera, but it will turn Clockwise or Counterclockwise when Camera rotate to left or right.
Can I make the plane always face to camera without turning Clockwise or Counterclockwise?
I think camera->upVector() can help me maybe, but I don't how to use.
My code :
class planeTransformClass : public Qt3DCore::QTransform {
public:
planeTransformClass( Qt3DCore::QNode *entity = nullptr ) :Qt3DCore::QTransform(entity) {}
signals:
void faceTo( QVector3D v ) {
setRotation(QQuaternion::rotationTo(QVector3D(0,1,0), -v));
} ;
};
// Background
Qt3DCore::QEntity *planeEntity = new Qt3DCore::QEntity(rootEntity);
Qt3DExtras::QPlaneMesh *planeMesh = new Qt3DExtras::QPlaneMesh(planeEntity);
planeMesh->setHeight(2);
planeMesh->setWidth(2);
Qt3DExtras::QTextureMaterial planeMaterial = new Qt3DExtras::QTextureMaterial(planeEntity);
Qt3DRender::QTexture2D *planeTexture = new Qt3DRender::QTexture2D(planeMaterial);
FlippedTextureImage *planeTextureImage = new FlippedTextureImage(planeTexture);
planeTextureImage->setSize(QSize(3000, 3000));
planeTexture->addTextureImage(planeTextureImage);
planeMaterial->setTexture(planeTexture);
planeMaterial->setAlphaBlendingEnabled(true);
// Transform
planeTransformClass planeTransform = new planeTransformClass(planeEntity);
planeTransform->setRotationX(90);
planeTransform->setTranslation(QVector3D(2, 0, 0));
planeEntity->addComponent(planeMesh);
planeEntity->addComponent(planeMaterial);
planeEntity->addComponent(planeTransform);
// connect camera's viewVectorChanged
camera->connect( camera, &Qt3DRender::QCamera::viewVectorChanged,
planeTransform, &planeTransformClass::faceTo);
Solution using geometry shader
There is already a C++ translation this QML code that I tried to translate (using geometry shader):
https://github.com/ismailsunni/qt3d-custom-shader
My own translation can be found here. It works now after solving the issues mentioned in this question.
Solution without geometry shader
I got a different version running based on this bug report. You can find my implementation on GitHub. The billboards don't change their size when the camera moves, i.e. become smaller and larger on screen like every other object, but I hope you can work with that.
On the master branch the images also move for some reason as can be seen in this image:
The no_instanced_rendering branch doesn't use instanced rendering and displays everything correctly.
Edit
I'm sorry I'm not using your example but I don't have time anymore to adjust it. Check out the patch related to the bug report I mentioned. The person implemented a material with this effect, you should be able to extract it and make it run.

Bounding Box Coordinates

I was reading the ArcGIS API for JavaScript version 4.14 documentation and cannot find an answer.
I'm spending hours looking into your documentation but it seems I cannot find a way to do a simple thing that can be done with any other mapping library (see Google Maps, Mapbox, Here etc etc).
I have a Map and a MapView, I would like to have the points of the bounding box of the map/mapview every time the map changes (North East / South West) to trigger a search on the database only on this area.
The map works perfectly, I'm trying to use the watcher:
viewMap.watch("stationary", function (status) {
if (status) {
PerformSearch();
}
});
function PerformSearch() {
var searchOptions = {
CurrentPage: 1,
Boundaries: { North: viewMap.extent.ymax, East: viewMap.extent.xmax, South: viewMap.extent.ymin, West: viewMap.extent.xmin },
....
}
But i see that viewMap.extent gives me a spatial reference that is not valid for me, I would like to just have the position as latitude and longitude of both points.
Is there a way to do it?
Many thanks... Any help would be apreciated!
The coordinates of the extent of the view are in the spatial reference system of the map, and this is determined by the spatial reference system of the basemap layer. If you are using Web Maps, like ESRI, OpenStreetMap, etc, then is Web Mercator WKT 3857.
Now, in order to get latitude/longitude you need to transform to Geographic coordinates. In this case you can use webMercatorUtils to obtain a transformed extent, something like this,
let geoExt = webMercatorUtils.webMercatorToGeographic(viewmap.extent);
ArcGIS API Doc webMercatorUtils

Can't show more than one map annotation in WatchOS 2.0

I've updated recently an apple watch app to watchOS 2 and I'm facing a strange behaviour involving map annotations. In the previous version I drew two annotations with two images without any problem but now I can see the images only when just one annotation is shown. When I try to add two annotations, the most recent added is not showing the image and show the default pin annotation. Is that a bug? I'm shocked nobody seems to comment this issue.
This is my code:
var distance = currentLocation.distanceFromLocation(aLocation!)
let middleLat = (currentLocation.coordinate.latitude + aLocation!.coordinate.latitude)/2
let middleLon = (currentLocation.coordinate.longitude + aLocation!.coordinate.longitude)/2
let middleCoords = CLLocationCoordinate2DMake(middleLat, middleLon)
self.theMap.removeAllAnnotations()
let region = MKCoordinateRegionMakeWithDistance(middleCoords, distance * 1.6 , distance * 1.3)
self.theMap.addAnnotation(aLocation!.coordinate, withImageNamed: "aAnnotation", centerOffset: CGPoint(x: 0, y: 0))
self.theMap.addAnnotation(currentLocation.coordinate, withImageNamed: "UserAnnotationW", centerOffset: CGPoint(x: 0, y: 0))
self.theMap.setRegion(region)
In this case only image for "aAnnotation" is shown and "UserAnnotation" get the default pin. If I swap lines 7 and 8, the user image is shown instead.
Anyone?
Thx
Well, I've been told in the apple devs forum that in fact this is a bug. So, nothing to worry about if you are in the same case.
Update: Everything back to normal using the new 2.0 GM released today.

Xbox One Right Trigger Not Working

I have an Xbox One controller setup with Unity3d, and when I try to use the RT button nothing happens.
With the following setup, the RB button works fine:
I have looked at this but setting that up doesn't make sense to me. I have tried 3rd Axis 0_10th and I have tried 3rd Axis 0_1 but those are not valid. What is the proper settings for this to work?
To the get the result I was looking for, I needed to set it up the following way:
Then to get the button to work we need to use:
if(Mathf.Round(Input.GetAxisRaw("Fire1")) < 0){
// Firing code here
}
instead of:
if(Input.GetButton("Fire1")){
// Firing code here
}
Yes, thanks for posting. I was having the same problem using a 360 wired controller in Unity3d. It looks like the Left and Right triggers now both use the 3rd axis (Joystick) with the Left generating positive (0 to +1) values and the Right trigger generating negative (0 to -1) values. This differs from all the documentation I was finding.

How to use Silverlight 4 Beta Print Preview?

One of the Silverlight 4 features listed in a lot of the PDC documents is Print Preview.
I've searched for examples on how to use this and found nothing so far. Has anyone got this working yet? Can you give me some pointers on how to implement a simple web app with print preview in.
I have not seen print preview as any of them but actual Printing support in which you can control which controls are printed and events based on the printing process.
After looking for a while I found a way to do this by combining some features I found in other projects, but they used it for image manipulation. I tried with printing and it seems to work fine.
Here how it works:
Get the base container for the print contents converted to a bitmap by using WriteableBitmap, here I´ll use a Canvas:
WriteableBitmap wb = new WriteableBitmap(this.canvas1, null);
Use this bitmap as a source for a Image control (can be inside a ScrollViewer, what is even better).
this.imagePreview.Height = wb.PixelHeight;
this.imagePreview.Width = wb.PixelWidth;
this.imagePreview.Source = wb;
Set scaling base units (used 1 percent in this case):
Point scale = new Point();
scale.X = imagePreview.Width/100d;
scale.Y = imagePreview.Height/100d;
Then adjust the scaling using a Slider (optional)
private void vSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
imagePreview.Height = scale.Y * vSlider.Value;
imagePreview.Width = scale.X * vSlider.Value;
}
I think from the lack of responses and the fact that as Hurricanepkt pointed out in his reply Tim Heuer and others talk about a virtual print which if displying the same thing on the screen could be built quite easily into your own bespoke Print Preview functionality that the Print Preview listed in some lists is actually people misinterpretting what the Virtual Print documents actually are.