Get a collection of detected objects from PredictionClient - google-cloud-automl

Am using google cloud automl java sdk. I have created my own trained model. Is there any way that I can get access to the collection of detected objects in an image so that I can draw bounding boxes around them. Right now I get only the detected labels.

This is not currently supported. Its a known feature request, so stayed tuned

Related

Highlight buildings in a map

I have a requirement where I need to highlight the buildings around my current location on a map. I am using Xamarin and was wondering if anyone can point me to a correct library or control that can fulfill my requirement.
I am currently using Mapsui for Xamarin but I don't think it has the feature I am looking for.
If you have access to the geometries of the buildings there are many ways you could implement highlighting.
One way that comes to mind. Create a layer on top of your background layer with the same geometries as data source. Use a ThemeStyle to show only the selected geometry. The ThemeStyle class is created with a callback method which determines the style. In that method you should return no style unless the feature id is the same as selected feature id.
You can take a look at the ThemeStyle sample for a more general use of themes (no highlighting).
Also you could look at Mapsui.Sample.Wpf.Editing. Here is a screenshot of that sample:

Monogame Extended Tiled

I'm making an isometric city builder using Monogame Extended and Tiled. I've got everything set-up and now i need to somehow access the specific tiles so i can change them at runtime as the user clicks on a tile to build an object. The problem is, i can't seem to find a "map.GetLayer("Layername").GetTile(x,y) or .SetTile(x,y) function or something similar.
Now what i can do is edit the xml(.tmx) file which has a matrix in it that represents the map and it's drawn tiles. The problem with this is that i need to build the map in the content pipeline again after editing for the changes to be displayed. I can't really build at runtime or can i?
Thanks in advance!
Something like this will get you part way there.
var tileLayer = map.GetLayer<TiledMapTileLayer>("layername");
TiledMapTile tile;
if(tileLayer.TryGetTile(x, y, out tile))
{
// do something with tile
}
However, there's only a limited amount of things you can actually do with the tile once you've got it from the map.
There's no such thing as a SetTile method because changing tile data at runtime is not currently supported. This is a limitation of the renderer, which has been optimized for rendering very large maps by building static geometry that can't be changed once it's loaded into the graphics card.
There has been some discussion about building another renderer that would handle dynamic map changes but at this stage nothing like that has been implemented in the library. You could always have a go at implementing a simple renderer yourself, a really basic one is not as hard as you might think.
An alternative approach to dealing with this kind of problem might be to pre-process the map data before giving it to the renderer. The idea would be to effectively separate the layers of the map that are static from those that are dynamic and render the dynamic tiles as normal sprites. Just a thought, I'm not sure about the details of how this might work.
I plan to eventually revisit the Tiled API in the next major version of MonoGame.Extended. Don't hold your breath, these things can take a lot of time, but I am paying attention to the feedback and kinds of problems people are experiencing with the existing API.
Since the map data is stored in a XML (or csv) file which runs through the Content Pipeline you can not change it at runtime.
Anyways, in a city builder you usually do not change existing tiles but you place object on top of existing tiles.

Editing PASCAL VOC bounding box data

I'm generating data for training an object detection ANN. I'm currently automatically generating the training data based of rules which i'm implementing (automatically captures the image and creates bounding boxes), however the algorithm for creating the data is imprecise (otherwise i wouldnt need an AI for it)
I am looking for an app or github repo that inputs the Pascal VoC annotation file and image, and allows you to visually modify (add/remove/update) the bounding boxes to clean up the data. Using windows currently.
Cheers
Depending on platform I use:
Linux/win - LabelImg
macOS - RectLabel (unfortunately not open source, but only costs $0.99)

GeoServer: caching fails on reprojection

I want to publish the data in the Oracle DBMS.
Since the SRS of the data (which is EPSG:3093) is different from the SRS the client wants (which is EPSG:5179), it must be transformed.
So, I’ve set the layer property on the Edit Layer page as follows:
Native SRS: EPSG:3093 (Tokyo / UTM zone 52N)
Declared SRS: EPSG:5179 (Korea 2000 / Unified CS)
SRS handling: Reproject native to declared
The problem starts now.
When I clicked ‘Compute from data’ for Native Bounding Box, it displays the result coordinates in Declared SRS, no Native SRS.
Is this the correct behavior? Since it is ‘Native Bounding Box’, the values should be in Native SRS.
Anyways when I clicked ‘Compute from native bounds’ for Lat/Lon Bounding Box, it correctly translates from ‘Declared SRS’.
Maybe it is correct to display the Native Bounding Box in Declared SRS then. (weird)
Anyways the client (OpenLayers 3) displays the data correctly.
But another problem remains.
Integrated GeoWebCache refuses to cache the tile images.
When the logging is set to VERBOSE_LOGGING, it logs the following error:
org.geowebcache.grid.OutsideCoverageException: Coverage [minx,miny,maxx,maxy] is [0, 4097, 6143, 6143, 11], index [x,y,z] is [3101, 2791, 11]
Since the caching works correctly for the other layers that does not transform the source data (since the data is already in EPSG:5179), that must be the transformation problem. Or another one.
When I see the coverage area of the EPEG:3093 on the Demos / SRS List page on the GeoServer, the area seems to be wrong. (It does not even cover Tokyo!) http://epsg.io/3093 displays the correct one.
Is this the cause of the caching problem?
Does GeoWebCache look for the coverage of the SRS and rejects the out-of-bound request?
My GeoServer version is 2.7.1.1.
You should store your data in the native projection as GeoServer will automatically reproject the data when a client makes a request in a different projection.
Then caching and the bbox will work.
I've traced the source code from GridSubset.java to GeoServerTileLayer.java and found that the content of the gwc-layers layer file had wrong gridSubset extent coords minY value. (It was too high)
I don't know why... Since I manage the gwc-layers layer files using Git, maybe some file date inconsistency confused GeoServer to sync the values. Or maybe I just broke something. I can only guess... Now after changing that value, caching works.

How to render and retrieve image data on Google Project Tango?

I'd like to render the live image data on a GL surface (as shown in various Project Tango samples), and at the same time record (encode) it via a MediaCodec.
(On an Android Lollipop device, I've accomplished that using the camera2 interface and multiple surface targets, which works fine, but thus far Tango is pre-Lollipop...)
From other answers, it appears that you have to use the C API to access the image data.
The C API provides two camera frame functions -- TangoService_connectTextureId() and TangoService_connectOnFrameAvailable(). However, the documentation states "Use either TangoService_connectTextureId() or TangoService_connectOnFrameAvailable() but not both."
Why not both?
How do I best render and retrieve the image data?
The Pythagoras release now allows for simultaneous use of color and color texture callbacks now. That said, you want to use the connectOnFrameAvailable if you want to process the image, you'd end up doing extra unnecessary work if you try and peel it out of the texture.

Resources