- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
		2 Replies
	
		
		
			
			
			
					
	
			- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you provide the relate codes so we can help you to figure out the issue? Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I called the AcquirePreviewImage function and got the preview image.
	            Then I transfer the preview image into Texture2D and use it as the mainTexture of the plane in Unity.
	            Relate code is :
	            
	          
 //Preview the scanning result
            PXCMImage scanimage = scan.AcquirePreviewImage ();
        
            /*Retrieve and render the individual color and depth images */           
            if (scanimage != null) {                        
                if (scanTexture2D == null) {                     
                    /* If not allocated, allocate a Texture2D */                     
                    scanTexture2D = new Texture2D (scanimage.info.width, scanimage.info.height, TextureFormat.ARGB32, false);  
                    
                    /* Associate the Texture2D with a gameObject */                     
                    scanPlane.renderer.material.mainTexture = scanTexture2D;                     
                }  
                
                /* Retrieve the image data in Texture2D */                 
                PXCMImage.ImageData scanImageData;
                scanimage.AcquireAccess (PXCMImage.Access.ACCESS_READ, PXCMImage.PixelFormat.PIXEL_FORMAT_RGB32, out scanImageData);               
                scanImageData.ToTexture2D (0, scanTexture2D);               
                scanimage.ReleaseAccess (scanImageData);  
                
                /* Apply the texture to the GameObject to display on */                 
                scanTexture2D.Apply ();  
                scanimage.Dispose ();
            }
	            
	            I have another question now.
	            I set the scan configure as below.
	            
	          
            scan_config = new PXCM3DScan.Configuration();
            scan_config.maxVertices = 30000;
            scan_config.mode = PXCM3DScan.ScanningMode.VARIABLE;
            scan_config.options = PXCM3DScan.ReconstructionOption.LANDMARKS;
            scan_config.options = scan_config.options | PXCM3DScan.ReconstructionOption.TEXTURE;
            scan_config.startScan = StartScanFlag;
            pxcmStatus ConfiguresState = scan.SetConfiguration (scan_config);
            Debug.Log ("Face Scan Module Configure setting state : " + ConfiguresState);
	            
	            The error message said "Face Scan Module Configure setting state : PXCM_STATUS_INIT_FAILED".
	            
	            But if I remove the configure setting of Texture, it is work!
 
					
				
				
			
		
					
					Reply
					
						
	
		
				
				
				
					
						
					
				
					
				
				
				
				
			
			Topic Options
			
				
					
	
			
		
	- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page