picture analysis - human figure picture is straight [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I'm looking for a way to analyze an image ( the human figure ) and verify whether it is necessary to rotate the image or images straight.
i'm using c# env.

If you could detect the eyes then you could figure out if the image should be rotated using the eyes positions.
if (eye1.y - eye2.y) > (eye1.x - eye2.x) => the image should be rotated
Of course you would have to check and subtract the smaller value from the higher value when you calculate the position difference in order for this to work

Related

Image compression in machinelearning dataset

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 51 mins ago.
Improve this question
Microsoft Modelbuilder's autogenerated code suggests to load training/inference data like this:
var imageBytes = File.ReadAllBytes(path);
When I create a 100x100 bit solid colored cube in MSpaint and save it as .png and use above function to load the file I get a byte[342], while I would expect 100x100x3 bytes if it were uncompressed(?).
Am I correct to assume that the compression is intact here?
If a model is trained with compressed data, does it need similary compressed data when making predictions?
Could a model's performance improve if trained on uncompressed data?

Screen.Bounds is not returning correct values [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 4 months ago.
Improve this question
in my winform App, i wanted to get the system's resolution and using Scren.bounds for this. Code was running pretty good few weeks before and it was getting correct values but somhow for past few days it's not returning correct values and always return 560 X 300 whereas my Resolution is set to 1366 X 768 with 100% scaled!
As you can see in the attachted images in debuging values show width and height of 556 and 300 respectively where as if a see these debugging values in IEnumerbale Visualizer then it's showing correct values (1366 X 768).
Can anyone point out the issue or i'm missing something!
.net Target Framework is 4.6.2
while i'm using window 11.
IEnumerableVisulaizer Image
i have tried every possible solution making app dpi Aware, setting scale to 100% etc but nothing worked for me so far!
Thanks!
The Size property is correct as it shows resolution in hexadecimal values, try to convert those values to integers:
var width = Convert.ToInt32(Screen.AllScreens[0].Bounds.Size.Width.ToString(), 16);
var height = Convert.ToInt32(Screen.AllScreens[0].Bounds.Size.Height.ToString(), 16);

How to make symmetric draws in c# [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I have to make a project on "symmetry" theme in c#. I chose to make a symmetric draw. You draw on the left part and it will appear a symmetric drawing on the right one! How to make this with 2 split containers? Thanks!
There are many types of symmetry.
Take a look: https://en.wikipedia.org/wiki/Symmetry_(geometry)
Assuming you just want mirror symmetry, for every point (left_x,left_y) in your left container, the corresponding point in your right container (right_x,right_y) will be calculated as follows:
right_y = left_y;
right_x = width_of_right_container - left_x;

Collision of two balls in wpf and getting the paths of colliding balls [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
This question is regarding WPF.
I have two balls, one static and the other is moving towards the static ball. On collision the balls would move in the direction that would be decided by the collision that at which angle they would collide and move accordingly.
My question is basically for suggestions for what is the easiest and the most effective way of colliding the objects in WPF and after collision giving them a path to move accordingly. Apart from deceleration etc, what should be the best strategy that should be applied to DETECT collision and GIVE NEW PATHS TO THE BALLS AFTER COLLISION.
Simply figure out the distance of the centers of the 2 balls.
if (distance(ball1.Center, ball2.Center) <= ball1.Radius + ball2.Radius)
{
// collision
}
For the distance use this:
double x = ball1.Center.X - ball2.Center.X;
double y = ball1.Center.Y - ball2.Center.Y;
double distance = Math.sqrt(x*x + y*y); // pythagoras
For calculating the new directions you'll need some more math. Have a look for a geometrics library like it is delivered with XNA. Try googeling your question again and use XNA in the search instead of WPF - this will solve your problem, i guess.
I would calculate the distance (pythagoras) between them, if the distance is smaller than the two radius added, a collision occurs.
Check here for the angle between the points:
Math Calculation to retrieve angle between two points?
You could check this one:
Ball to Ball Collision - Detection and Handling

compare two images with low quality [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am working on an algorithm to extract diffrences between two images with diffrent qualities for example you have a photoshop file which is created by a designer and then you print it out with some devices and you have scaned it and saved it as a bmp file.
the main question is how we can compare these two images?
it is not possible two compare pixel by pixel, because in scaned version many objects have changed for example lines become thicker.
my idea is to find any shapes in two images then compare them based on location and other shape featurs but the main problem is that in low quality images it become too difficult to compare.because in low quality we have noise and after noise canceling some shapes will be lost. for example when i use open and close or morphology filters i lose some characters such as "i Q O 0" or other shapes.what is your opinion ?
you have image1 & image2 that have to compare .In both images find corners by hough transform then register two images by corners.you can use findhomogrphy() .Now the two images are the same size.In the finial you can use matchTemplate() for find difference between two images.
The suggestion of #Mostafa Sataki sounds good. An alternative would be to align the images as suggested, then use a similarity measure such as MSE or PSNR
Another possibility would be to try to match keypoints from the two images to see if they are the same image.

Categories

Resources