Ask Your Question

lock042's profile - activity

2019-01-04 01:31:34 -0600 asked a question Link error with opencv 4.01 on os x

Link error with opencv 4.01 on os x Hi everybody, since opencv 4 I have a link issue with my program on os x. Do you hav

2018-03-21 16:07:07 -0600 commented question Homography transformation + scale

Works great, many thanks.

2018-03-21 04:39:54 -0600 commented question Homography transformation + scale

Oh gosh. This is exactly the same question. I'm so confused. Thank you, I will make some tests and will give you feedbac

2018-03-21 03:55:47 -0600 asked a question Homography transformation + scale

Homography transformation + scale I have a transformation between 2 images. I've computed the homography matrix. Applyin

2017-12-07 05:30:43 -0600 commented answer Get a 2D gaussian kernel for deconvolution

So easy. Sorry for this dummy question :). And of course, thank you for your answer.

2017-12-07 05:30:07 -0600 marked best answer Get a 2D gaussian kernel for deconvolution

Hello,

I am trying to apply the Lucy-Richardson deconvolution algorithm with the following code:

static Mat RLTikh_deconvolution(Mat observed, Mat psf, int iterations) {

    Mat deconv = observed.clone();
    double mu = 0.01;

    // Iterate
    for (int i = 0; i < iterations; i++) {

            // Temporary matrix
            Mat ratio;
            filter2D(deconv, ratio, deconv.depth(), psf, Point(-1, -1), 0,
            BORDER_REFLECT);

            divide(observed, ratio, ratio);

            filter2D(ratio, ratio, ratio.depth(), psf, Point(-1, -1), 0,
            BORDER_REFLECT);

            // TV Regularization
            Mat denom;
            Laplacian(deconv, denom, deconv.depth(), 1, 1, 0, BORDER_REFLECT);
            denom = 1.0 - 2.0 * mu * denom;
            divide(ratio, denom, ratio);

            // Apply iteration on the estimate
            multiply(deconv, ratio, deconv);
    }

    return deconv;
}

I get the psf mat with Mat psf = getGaussianKernel(13, -1);

The problem is that this kernel is a 1D kernel but I would like to apply a 2D one. I believe I could apply the kernel two times (in X direction and Y direction) to get the result I want. But how I can do it ?

2017-12-07 04:46:13 -0600 asked a question Get a 2D gaussian kernel for deconvolution

Get a 2D gaussian kernel for deconvolution Hello, I am trying to apply the Lucy-Richardson deconvolution algorithm with

2017-10-19 03:49:52 -0600 commented answer Trying to remove artefact with interpolation

Oh fine. Thank you

2017-10-18 09:34:27 -0600 commented answer Trying to remove artefact with interpolation

@LBerger: Have you seen my last message ? Sadly I did not manage to run your code.

2017-09-20 09:50:05 -0600 commented answer Trying to remove artefact with interpolation

@LBerger: Sorry for the huge delay. I tried to compile your code but too many errors. See errors: http://hpics.li/5e9888

2017-09-20 09:45:35 -0600 commented answer Trying to remove artefact with interpolation

Sorry for the huge delay. I tried to compile your code but too many errors. See errors: http://hpics.li/5e98888

2017-09-20 09:43:25 -0600 commented answer Trying to remove artefact with interpolation

Sorry for the huge delay. I tried to compile your code but too many errors.

2017-09-12 02:35:28 -0600 commented answer Trying to remove artefact with interpolation

The clamping mechanism acts by limiting the high-pass component of the interpolation filter selectively to fix the under

2017-09-08 07:35:51 -0600 commented answer Trying to remove artefact with interpolation

Sorry I haven't much more information. It is very nice for trying to help me. I know another algorithm (noHalo, used in

2017-09-08 03:47:11 -0600 commented answer Trying to remove artefact with interpolation

I have no skills for writing my own interpolation algorithm. In fact I would like to write something like that: https://

2017-09-08 03:40:32 -0600 commented answer Trying to remove artefact with interpolation

I have no skills for writing my own. In fact I would like something like that: https://pixinsight.com/doc/tools/StarAlig

2017-09-06 09:27:03 -0600 commented answer Trying to remove artefact with interpolation

Something wrong. For example the Median absolute deviation of the images you sent became 0. It is very strange. Some sig

2017-09-06 09:00:52 -0600 commented answer Trying to remove artefact with interpolation

And if you remove the super sampling you will see artifact. By the way if in the resize you also use Lanczoz you should

2017-09-06 08:44:06 -0600 commented answer Trying to remove artefact with interpolation

You're right. The thing I would like to do is playing with a parameter to adjust this effect.

2017-09-04 08:03:07 -0600 commented answer Trying to remove artefact with interpolation

Hummmm. there's something wrong in the dynamic of the image you sent me I can't explain.

2017-09-03 14:09:27 -0600 commented answer Trying to remove artefact with interpolation

Yes you're right, but I'm using cfitsio library in C. When you have BITPIX = 16, BSCALE = 1 and BZERO = 32768, you can l

2017-09-03 14:07:42 -0600 commented answer Trying to remove artefact with interpolation

Yes you're right, but I'm using cfitsio library in C. When you have BITPIX = 16, BSCALE = 1 and BZERO = 32768, you can l

2017-09-03 11:23:01 -0600 commented answer Trying to remove artefact with interpolation

In fact: #define USHORT_IMG 20 /* 16-bit unsigned integers, equivalent to / / BITPIX = 16

2017-09-02 17:14:20 -0600 commented answer Trying to remove artefact with interpolation

The only difference I see is that you work with short data (CV_16SC1), not ushort. What if you use ushort ?

2017-09-01 15:04:13 -0600 commented question Trying to remove artefact with interpolation

Homography Matrix: -0.99974 -0.00299 +4002.14396, +0.00239 -0.99964 +2673.06210, -0.00000 -0.00000

2017-09-01 15:03:13 -0600 commented question Trying to remove artefact with interpolation

The image is here: https://www.dropbox.com/s/gmb182d6u5nxduy/pp_sel_00000.fit?dl=0. I use the following function: warpPe

2017-09-01 15:02:44 -0600 commented question Trying to remove artefact with interpolation

The image is here: https://www.dropbox.com/s/gmb182d6u5nxduy/pp_sel_00000.fit?dl=0. I use the following function: warpPe

2017-09-01 08:56:34 -0600 commented question Trying to remove artefact with interpolation

The problem is that on linear images, typical undershoot artifacts are composed of one or a few very dark pixels around

2017-09-01 08:48:09 -0600 commented question Trying to remove artefact with interpolation

The problem is that on linear images, typical undershoot artifacts are composed of one or a few very dark pixels around

2017-09-01 08:48:02 -0600 commented question Trying to remove artefact with interpolation

The probleme is that on linear images, typical undershoot artifacts are composed of one or a few very dark pixels around

2017-09-01 03:17:36 -0600 commented question Trying to remove artefact with interpolation

Oh no. Sorry. Changes are not really visible.

2017-09-01 03:14:40 -0600 commented question Trying to remove artefact with interpolation

It looks like artifacts are almost gone like that !!!

2017-09-01 02:47:09 -0600 commented question Trying to remove artefact with interpolation

Yes and to convert back to 16U: out.convertTo(out, CV_16UC3, 65535.0); ?

2017-09-01 02:26:22 -0600 commented question Trying to remove artefact with interpolation

Could it be as simple that this solution ? Ok I have to find a way to convert data. Thank you.

2017-09-01 02:10:31 -0600 commented answer Trying to remove artefact with interpolation

The problem with using cubic in the warpPerspective call is that result is too blurred.

2017-08-31 14:26:26 -0600 edited question Trying to remove artefact with interpolation

Trying to remove artefact with interpolation Hello everyone, I'm posting here my question because I have some issues wit

2017-08-31 04:21:34 -0600 asked a question Trying to remove artefact with interpolation

Trying to remove artefact with interpolation Hello everyone, I'm posting here my question because I have some issues wit

2017-08-31 00:21:33 -0600 marked best answer Apply quadratic function to an image

Hello.

I have a quadratic function I would like to apply to my image. The transformation has the following form:

  • x' = A + Bx + Cy + Dxx + Exy + Fyy
  • y' = G + Hx + Iy + Jxx + Kxy + Lyy

For a linear transformation:

  • x' = A + Bx + Cy
  • y' = D + Ex + Fy

it was easy because I could use WarpAffine by putting the coefficients in a 3x2 matrix. Moreother, is it easy to get the value of rotation angle and scale ?

Again, with the linear transformation, rotation angle is easily computed with atan2(B, C). Scale is (sqrt(BB + CC) and shifts are A and D.

2017-08-29 04:20:50 -0600 commented answer Apply quadratic function to an image

Oh gosh .... I have to find the the way to compute the inverse formula. Thank you.

2017-08-28 15:16:44 -0600 commented answer Apply quadratic function to an image

Thank you for your answers. But I'm afraid that is a too easy approach. Indeed, I think I would need interpolation algor

2017-08-28 09:08:26 -0600 asked a question Apply quadratic function to an image

Apply quadratic function to an image Hello. I have a quadratic function I would like to apply to my image. The transfor

2017-08-25 09:26:38 -0600 commented answer What's the best way to use findHomography

I could yes. But not very often

2017-08-25 08:21:05 -0600 commented answer What's the best way to use findHomography

Yes I do have rotation, and sometimes distorsions. So I guess the solution is to use triangle (at least) similarity algorithm before giving list to findHomography.

2017-08-25 08:09:37 -0600 commented answer What's the best way to use findHomography

@LBerger In fact I search stars in reference image, then I search stars in the second image. I have two lists. I sort these lists by brightness of stars.

But, of course, the order in the two lists can change a bit. Then a stars can be detected in an image while not in the other, etc .... So I want to compare the n reference stars to the other and compute the homography matrix in order to apply the transformation matrix to the second image. At the end, you can stack both.

2017-08-25 07:55:11 -0600 commented answer What's the best way to use findHomography

C++ version has also double ransacReprojThreshold as parameter. By default this is 3. I've already tested with 1 or 0.1 with no sucess. So your last sentence means that ordering points is necessary ? So for now I do not know how I can do and my question is: if I order the 10 best points for example, what is the use of RANSAC algorithm ??? There will be no outliers.

2017-08-25 07:35:06 -0600 commented answer What's the best way to use findHomography

These keypoints are stars in astronomical images. So I use my own algorithm. It is working well as I can circle all detected stars.