Detecting reflection on objects or curved images inside images - opencv

I need to detect reflection on objects (i.e. on a car) or an curved image inside another image. Does anybody know how to do that?
Some examples of what I'm looking for:
Also, I don't need to detect a clear object from that reflection, I jut need to see if there's light reflecting from an object

Related

Removing occluded segmentations

I have a segmented image and an original image. I want to be able to draw bounding boxes on objects in actual image using the segmentations. So far using cv2.findContours(), and cv2.Canny() are both able to find bboxes. But I want to remove objects that are hidden underneath trees or other objects as the segmentations are still there of those objects. Is there a way to discard occluded objects ?

Getting the current visible entities in RealityKit

Currently, RealityKit doesn't have any method that provides the currently visible entities. In SceneKit we do have a method for that particular functionality—nodesInsideFrustum(pointOfView).
Our internal solution is to create a big fake bounding box in front of the camera. We then check intersections between the "frustum" bounding box and each entity's bounding box. That, of course, is a bit cumbersome and inaccurate. I wonder if someone can come up with a better solution who is willing to share it.
You could combine two ARView methods:
ARView.project(position) to get the 2D point in screen space
ARView.bounds.contains(point) to know if it's visible on screen
But it's not enough, you also have to check if the object is behind you:
Entity.position(relativeTo: cameraAnchor) (with cameraAnchor being an AnchorEntity(.camera)) to have the local position
the sign of localPosition.z shows if it's in front or behind the camera

In ARKit, Can I select any real world object to bind virtual objects with it, using depth map or other techniques?

I am wondering how to implement this in ARKit: I have a bottle on the table and I want to add a "small hat" on it, by circling the aimed object like I did with red pen in the pic.
enter image description here
Also, if the bottle is partly hidded, it can also be selected. Can I implement this bound between any real object and virtual objects in ARKit? Maybe using depth map or sth.
enter image description here
Thanks a lot!

How to recolor an image on specific area?

I'm trying to create an iOS recoloring app (this is my reference), and i need to know how recolor some portion of the image when user taps on a given area. All the loaded pictures will be black/white initially.
Is there any prebuilt library? Or which graphics framework should i use?
Any help will be appreciated.
If what you are looking for is adding/replacing the colour within a certain shape and edges are really important (as in the example) then you should be looking into vectorised drawing.
What this means is every shape in your image would have an actual object representation in your code, and you could easily interact with that object to do whatever you want (i.e. tap gestures to change colour, zoom etc.).
This however, means that you can't simply use .jpeg images, and you need to use images in vector format, such as .svg or CorelDraw.
As a reference, check out SVGKit, which is an excellent library for working with SVG images.

UIImageView Annotation

I am trying to capture an Image from Camera show it on the UIImageView.
After that I have some buttons for e.g. "Paint Brush", "Eraser", "Undo", "Save".
Using Brush I want to mark some items on the image captured.
What is the best way to accomplish the annotation and then save the image.
I am not sure what should be used. Should I use touchesbegan/end etc.. or some other alternative.
Regards,
Nirav
U need to understand BĂ©zier Path Basics.Search it on Google or Apple Documentation.
The UIBezierPath class is an Objective-C wrapper for the path-related features in the Core Graphics framework. You can use this class to define simple shapes, such as ovals and rectangles, as well as complex shapes that incorporate multiple straight and curved line segments.

Resources