Appying texture to mask region in panoptic segmentation, how we change the floor texture? - image-segmentation

enter image description here
I want to change the floor texture of above image

Related

Coordinate of a pixel of an image to coordinate on the texture

A Texture2D is mapped on a sphere. Thanks to GetPixel(raycastHit.texturecoord) I can get the pixel value of this texture, when, for instance, a ray hit the sphere. So if I convert an image I to a texture T and map T on a GameObject G, I can get the pixel value from G to I (G--textureCoord-->T--GetPixel-->I). If I convert those (x,y) coordinates into world coordinates, I can trigger event on certain colors, so it works. I use this solution to perform pixel to world position.
But I can't do the opposite. Imagine that I have a list of bounding boxes for different objects on the image I (so with coordinates between I.width and I.height). If I convert those coordinates (bx1, bx2) into world coordinates it simply doesn't work.
I noticed that when I compare the GetPixel value when I target a given color on G with my controller, I don't get the same pixel coordinates as the one on the original image.
In the end I want to get the texture coordinate from an image (G<--textureCoord_to_word_coordinates--T<--?????---I).

Texture stretching when applied to sphere

I am completely new to this so I expect I may be doing something trivial incorrectly. I have a regular sphere in my Unity3D scene and I have a .jpeg image with a number in various places and orientations. When I apply the image to the sphere as a texture, the numbers centrally located in the image display fine on the sphere, but those closer to the top or the bottom of the image file appear warped on the sphere. For e.g with the number 12, the base of the 1 and 2 are bigger and the number tapers the further up you go when rendered on the sphere.
This is not an error on your part; this is the way the texture is mapped to a sphere by default.
To 'fix' this you would have to compensate that distortion in your texture directly or modify the UV coordinates of the sphere.

how to crop the binary image from the point of the centroid of an image to some extent

After finding out the centroid of the image , i want to crop some object in an image from the centroid point to some extent. I can use regionprops function to identify the centroid.. the thing is how to crop the image based on the centroid point to some region and how to make my object position in an image to fix at the centre of the whole image.

How to apply a texture image in GLGravity Teapot iphone?

For openGl expample, Xcode given a project GlGravity. But Instead of showing yellow color how to apply a Texture image without textureCoordinates?.
You need some kind of texture coordinate, otherwise the whole concept of textures makes no sense: A texture is a function mapping a set of n coordinates to some value (depth, luminance, alpha, colour or combination of those) defined by data the samples are taken from and interpolated.
You can generate the texture coordinates, either statically from your mesh, or in the vertex shader. Or you supply them directly. But you need some texture coordinates to make this work. A very cheap and simple texture coordinate generator is using the vertex position as texture coordinate; this will project your texture along the coordinates axes onto the model. So if you've got a 2D texture it will be applied in the XY plane, as if there were a parallel projecting slide projector at coordinates (0,0,\infinity).

White edges appearing at edge of cube

When I render a cube and texture it I end up with white edges along the cube. I've checked the vertex and texture coordinates and they look fine to me. My texture is a power of 2. It is a texture map containing 4x4 textures in which each texture is 16x16 pixels. Does anyone have any suggestions?
I guess you are experiencing texture bleeding. You can solve it by either using GL_CLAMP on your textures or adjusting slightly your UV coordinates to 0.0005 and 0.0095 (for instance) instead of 0 and 1 to compensate for the texture sampling artifacts.