Jump to content

Segmentation task with pixijs


MaksTsk
 Share

Recommended Posts

Hi to everyone.

 

Pixi.js is amazing and I really want to use it in my project. But I have the following problem:

 

I have next task:

1. Background texture is source.jpg

2. Also there is another image (depth.png) in memory with region segmentation.

3. When user moves mouse on canvas (with source.jpg as background) I want to get connected with mouse position region on depth.png, and select this region on source.jpg.

4. As the regions from depth.png are just pixel map I need to render it pixel by pixel.

5. To do it I have found next solution:

6. As mouse moves I will have to create another texture, and swap to it.

 

I'm not sure about steps 5-6, especially about performance. Because I will have to put new texture every time as mouse moves.

 

Can somebody help with next two questions:

1. Is above solution correct? Would it have good performance?

2. May be there is bettor solution.

 

P.s. Right now this task is implemented with canvas 2d context. And it have some performance problem. So I decide to implement it with WebGL, but without any framework it will be huge amount of coding. By this reason I want to use pixi, but I'm not sure that I'm doing it right way. 

 

P.p.s. Thanks everybody for help.

post-15097-0-92186500-1434812683_thumb.j

post-15097-0-28568900-1434812716_thumb.p

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...