AgoraIO-Community / AR-Remote-Support

This is a POC of how to build a Remote support app (similar to Vuforia Chalk) using ARKit and Agora.io's Video SDK.
MIT License
23 stars 11 forks source link

How to draw line instant of point #16

Closed Matsuo32 closed 3 years ago

Matsuo32 commented 4 years ago

Hello How can i draw line instant of point on video screen or at least adjust size of point

Untitled-1

Thank you.

digitallysavvy commented 4 years ago

@Matsuo32 I would recommend you try implementing https://github.com/maxxfrazer/SceneKit-SCNLine.

to set proper expectations this is a proof of concept project, I have not set any timeline for improvements/enhancements but it's open source so anyone can create add this functionality themselves.

I would suggest for you fork the repo and to attempt to add this functionality and make a PR. I will happily work with you in an effort to build this into a community project.

Matsuo32 commented 4 years ago

@digitallysavvy Thank you for good support, I try to apply SCNLine to your example but it still not work, could you show me for example. ** one more question : How to take snapshot or screen shoot of video? Thank you again

digitallysavvy commented 4 years ago

@Matsuo32 can you please share a link to your repo/code? As I mentioned I’m happy to help you.

Regarding taking a Photo or Video, I used ARVideoKit as a dependency for a this reason, to make it very easy to create a video or take a photo.

Matsuo32 commented 4 years ago

@digitallysavvy Create side :Easy for take photo(it's work)

//1. Create A Snapshot let snapShot = self.sceneView.snapshot() //2. Save It The Photos Album UIImageWriteToSavedPhotosAlbum(snapShot, self, nil, nil)

Join side : I try to save image but not work because it not use ARVidoKit

UIGraphicsBeginImageContext(remoteVideoView.frame.size) remoteVideoView.layer.render(in: UIGraphicsGetCurrentContext()!) let sourceImage = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() UIImageWriteToSavedPhotosAlbum(sourceImage!, nil, nil, nil)

S__35373114

digitallysavvy commented 4 years ago
UIGraphicsBeginImageContext(CGSize(width: remoteVideoView.frame.size.width, height: remoteVideoView.frame.size.height))
remoteVideoView.drawHierarchy(in: CGRect(x: 0.0, y: 0.0, width: remoteVideoView.frame.size.width, height: remoteVideoView.frame.size.height), afterScreenUpdates: true)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
maxxfrazer commented 3 years ago

Added in #22