Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic About the rotating picture of the diagram (Read 1368 times)
JackPan
Full Member
***
Offline


I Love MindFusion!

Posts: 134
Joined: Apr 9th, 2020
About the rotating picture of the diagram
Aug 21st, 2020 at 11:13am
Print Post  
Hi All, Smiley

Some pictures are slanted like picture one. So I want to automatically correct it to the effect of Figure 2 before displaying it on the digram. How can I achieve it?

Any assistance would be appreciated.

Cheers,

Jack
  

8_21_1_1.png ( 100 KB | 87 Downloads )
8_21_1_1.png
8_21_0_0.png ( 170 KB | 89 Downloads )
8_21_0_0.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3171
Joined: Oct 19th, 2005
Re: About the rotating picture of the diagram
Reply #1 - Aug 24th, 2020 at 6:16am
Print Post  
Hi,

If that's a DiagramNode rotated by user, you can straighten it automatically by setting RotationAngle property to 0.

If the source bitmap contains a rotated image, you will need to use some image recognition algorithm / library to detect and deskew it. E.g. try these:

https://gist.github.com/russss/922be97d2a65eb534744c5a4054ff88d
https://opencv.org/about/

https://stackoverflow.com/questions/43913314/c-sharp-how-to-deskew-an-image
http://www.aforgenet.com/

https://www.codeproject.com/Articles/13615/How-to-deskew-an-image

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
JackPan
Full Member
***
Offline


I Love MindFusion!

Posts: 134
Joined: Apr 9th, 2020
Re: About the rotating picture of the diagram
Reply #2 - Aug 24th, 2020 at 7:10am
Print Post  
Hi Slavcho Smiley

Thank you for your valuable answer, I will get the answer I want from it.
Best wishes for you!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint