Is it okay to use 1D smoothing code for 2D path smoothing?

In summary, the conversation discusses the use of Numerical Recipes 1d smoothing C code functions to smooth a path defined in 2D by (x,y) over time. The speaker questions whether smoothing the variables independently is the best approach and is advised to ensure the smoothing algorithm considers the relationship between the two variables and any additional constraints on the path.
  • #1
honkskillet
1
0
Hi,
I am trying to smooth a path defined in 2d by (x,y) which varies in time. I am using the Numerical Recipes 1d smoothing C code functions savgol() and convlv() to smooth x and y independently, which seem to do a pretty good job. However, while it seems to work, I was wondering if I should truly being smoothing these variables independently. Note, I have found several source for Sav. Gol. 2d smoothing image smoothing, but that is not what I am looking for. Just smoothing of a path defined in x and y, which varies in time.
 
Technology news on Phys.org
  • #2
Is this an OK approach?Yes, you can use the same numerical methods for smoothing a path in 2D as for 1D. The key is to make sure that your smoothing algorithm takes into account the relationship between the two variables. You may need to adjust the parameters of your algorithm to ensure that the two variables are treated equally. Additionally, you should consider any additional constraints that you have on the smoothed path, such as the maximum allowable curvature or the minimum allowable distance between points.
 

Related to Is it okay to use 1D smoothing code for 2D path smoothing?

1. What is 2D Savitsky Golay C code?

2D Savitsky Golay C code is a type of code used in scientific research for smoothing and filtering 2-dimensional data. It is based on the Savitsky-Golay algorithm, which is commonly used for data smoothing and noise reduction.

2. How does 2D Savitsky Golay C code work?

The code works by fitting a polynomial function to a small window of data points in 2-dimensional space. The coefficients of the polynomial are then used to calculate a smoothed value for the center data point. This process is repeated for each data point in the dataset, resulting in a smoothed 2-dimensional dataset.

3. What are the advantages of using 2D Savitsky Golay C code?

One advantage is that it can effectively reduce noise in 2-dimensional data without significantly altering the overall shape or trends in the data. It is also relatively easy to implement and can be applied to a wide range of datasets, making it a useful tool for data analysis and visualization.

4. Are there any limitations to using 2D Savitsky Golay C code?

One limitation is that the code may not work well for datasets with large amounts of noise or outliers. It also requires the user to specify the size of the data window and the order of the polynomial, which can affect the accuracy of the results. Additionally, the code may not be suitable for non-linear data.

5. How is 2D Savitsky Golay C code used in scientific research?

2D Savitsky Golay C code is commonly used in various fields of scientific research, such as signal processing, image processing, and data analysis. It can be used to smooth noisy data, remove unwanted fluctuations, and improve visualization of data patterns. It is also used in combination with other techniques for data analysis and interpretation.

Similar threads

  • Programming and Computer Science
Replies
1
Views
981
  • Programming and Computer Science
Replies
3
Views
2K
Replies
3
Views
1K
  • Programming and Computer Science
Replies
13
Views
1K
Replies
22
Views
6K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
Replies
14
Views
1K
  • Programming and Computer Science
Replies
6
Views
1K
  • Programming and Computer Science
Replies
2
Views
1K
Back
Top