Christopher2222

5 years, 280 days


These are questions asked by Christopher2222

Using the two images from the branched question I tried to calculate the offset of the two images.  But it is too cumbersome and slow, can someone figure out a faster way?

Here's what I did,

I created both jpg images into a single row vector and then into an Array.  I then used a for loop with CircularShift to cycle one array and subtract it from the other.  I then took the absolute value and added all the values in the array and stored that value in another array.  The smallest value would indicate the highest probable position that both images have lined up.

Something like...

with(ArrayTools):

a:=convert(convert(img1,vector),Array)  #after img1 is padded to 184x184 from Markyan Hirnyk's answer
b:=convert(convert(img2,vector),Array)

for i from 1 to 100 do
  aa:=abs(CircularShift(a,i)-b):
  bb[i]:=add(k,k=aa):
end do:
min(convert(convert(bb,array),Array))


The problem is 100 shifts takes a long time, let alone go through the full image.  Is there a faster way to accomplish this?

Notepad displays alt+1, alt+2 and alt+3 as ☺☻♥

Just wondering why Maple displays them as square boxes?  Shouldn't it have the font capability to display them as well?

Different evalf results.

evalf(3/Pi);
                         .9549296583

evalf(3/Pi,1);
                         .9

evalf(3/Pi,2);
                         .96

evalf(3/Pi,3);
                          .954

 

evalf(.9549296583,1)
                                    1.

evalf(.9549296583,2)
                                    0.95

evalf(.9549296583,3)
                                    0.955

 

This is probably a floating point issue but shouldn't the results be the same?

 

 

 

A contest is being held.  The three prizes are a $2000 vacation, 1 paid week off work and a $500 camera pack.

In order to enter 1 ticket in the draw you have to contribute $1 per paycheque for the year.  So since there's 26 pay periods in a year each ticket will cost you $26. You can contribute as much as you want.

Let's say there's about 1600 employees in the company. 

How many tickets should you buy to maximize your chances?

1 2 3 4 5 6 7 Last Page 1 of 57