Changeset 41531 for trunk/psLib/src/astro/psCoord.c
- Timestamp:
- Apr 3, 2021, 2:16:42 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astro/psCoord.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.c
r41519 r41531 1000 1000 const psPlaneTransform *in, 1001 1001 psRegion region, 1002 int nSamples )1002 int nSamples, int extraOrders) 1003 1003 { 1004 1004 PS_ASSERT_PTR_NON_NULL(in, NULL); … … 1026 1026 PS_ASSERT_INT_LARGER_THAN_OR_EQUAL(nSamples, 1, NULL); 1027 1027 1028 // 1029 // Allocate a new psPlaneTransform if "out" is NULL, or has the wrong size. 1030 // 1031 psS32 order = in->x->nX; 1028 1029 // Allocate a new psPlaneTransform if "out" is NULL, or has the wrong size. For a 1030 // non-linear transformation, the inverted solution must have a higher order than the 1031 // forward solution. Since we are fitting a dense grid (generated below), it is not a 1032 // problem (in terms of over-fitting) to use a higher order 1033 1034 // XXX : the extra orders supplied here needs to be something supplied by the user 1035 1036 psS32 order = in->x->nX + extraOrders; 1032 1037 psPlaneTransform *myPT = NULL; 1033 1038 if (out == NULL) { … … 1036 1041 // the user has supplied a model with a specific order : fit that order 1037 1042 myPT = psMemIncrRefCounter(out); // we need to return something which can be freed 1038 # if (0)1039 if ((out->x->nX == order) && (out->x->nY == order) &&1040 (out->y->nX == order) && (out->y->nX == order)) {1041 myPT = out;1042 } else {1043 psFree(out);1044 myPT = psPlaneTransformAlloc(order, order);1045 }1046 # endif1047 1043 } 1048 1044
Note:
See TracChangeset
for help on using the changeset viewer.
