-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error "Input vector should be 1-D" when generating mesh #102
Comments
Hi @zhaoshaohua21, this error almost certainly indicates that something is wrong in your upstream processing, OR that the default parameters to |
Thank you for your response. This issue was generated by performing practical operations on your original Brahmaputra_Braided_River data. Now, I am using my own data for the operations, but a new issue has arisen: the skeleton obtained for the river does not match the original image. The attached files include test.tif, which is my original mask, and Cdm_channel_skel.tif, which is the skeleton image I obtained.
…---- Replied Message ----
| From | Jon ***@***.***> |
| Date | 7/18/2024 20:09 |
| To | ***@***.***> |
| Cc | ***@***.***>,
***@***.***> |
| Subject | Re: [VeinsOfTheEarth/RivGraph] Error "Input vector should be 1-D" when generating mesh (Issue #102) |
Hi @zhaoshaohua21, this error almost certainly indicates that something is wrong in your upstream processing, OR that the default parameters to compute_mesh() are insufficient for your case. There is no way for us to know without having a minimal, reproducible example to process ourselves. Can you share the mask that you're processing so we can take a look?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I have resolved the issue and am very grateful for the inspiration provided by your package. Additionally, I would like to share a geographic imaging plugin for Photoshop. By configuring this plugin in Photoshop, you can process images with georeference information that are imported into the software, and the exported images will still retain their georeference information. This provides some convenience for the initial mask processing.
…---- Replied Message ----
| From | ***@***.***> |
| Date | 8/8/2024 10:55 |
| To | ***@***.***> |
| Subject | Re: [VeinsOfTheEarth/RivGraph] Error "Input vector should be 1-D" when generating mesh (Issue #102) |
Thank you for your response. This issue was generated by performing practical operations on your original Brahmaputra_Braided_River data. Now, I am using my own data for the operations, but a new issue has arisen: the skeleton obtained for the river does not match the original image. The attached files include test.tif, which is my original mask, and Cdm_channel_skel.tif, which is the skeleton image I obtained.
---- Replied Message ----
| From | Jon ***@***.***> |
| Date | 7/18/2024 20:09 |
| To | ***@***.***> |
| Cc | ***@***.***>,
***@***.***> |
| Subject | Re: [VeinsOfTheEarth/RivGraph] Error "Input vector should be 1-D" when generating mesh (Issue #102) |
Hi @zhaoshaohua21, this error almost certainly indicates that something is wrong in your upstream processing, OR that the default parameters to compute_mesh() are insufficient for your case. There is no way for us to know without having a minimal, reproducible example to process ourselves. Can you share the mask that you're processing so we can take a look?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I will look at your data later, but if you're getting errors when running
through the examples (without changing anything), the problem is almost
certainly wrong package versions.
…On Wed, Aug 7, 2024, 10:56 PM zhaoshaohua21 ***@***.***> wrote:
Thank you for your response. This issue was generated by performing
practical operations on your original Brahmaputra_Braided_River data. Now,
I am using my own data for the operations, but a new issue has arisen: the
skeleton obtained for the river does not match the original image. The
attached files include test.tif, which is my original mask, and
Cdm_channel_skel.tif, which is the skeleton image I obtained.
---- Replied Message ----
| From | Jon ***@***.***> |
| Date | 7/18/2024 20:09 |
| To | ***@***.***> |
| Cc | ***@***.***>,
***@***.***> |
| Subject | Re: [VeinsOfTheEarth/RivGraph] Error "Input vector should be
1-D" when generating mesh (Issue #102) |
Hi @zhaoshaohua21, this error almost certainly indicates that something is
wrong in your upstream processing, OR that the default parameters to
compute_mesh() are insufficient for your case. There is no way for us to
know without having a minimal, reproducible example to process ourselves.
Can you share the mask that you're processing so we can take a look?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub
<#102 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADRPO5OY3KQ6Y7YY7D5QGC3ZQLM4FAVCNFSM6AAAAABK4HVROGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZUHA2TOMBXGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hello, I encountered this issue while calculating curvature. I have checked the skeleton image and found no problems.
>> skeleton_image = 'K:/Meandering_River/Results/skel.tif'
>> curvature_map = im_utils.skel_pixel_curvature(skeleton_image, nwalk=4)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\zsh\.conda\envs\myenv\lib\site-packages\rivgraph\im_utils.py", line 1342, in skel_pixel_curvature
py = np.ndarray.tolist(skelpix[:, 0])
IndexError: index 0 is out of bounds for axis 1 with size 0
---- Replied Message ----
| From | Jon ***@***.***> |
| Date | 8/8/2024 20:11 |
| To | ***@***.***> |
| Cc | ***@***.***>,
***@***.***> |
| Subject | Re: [VeinsOfTheEarth/RivGraph] Error "Input vector should be 1-D" when generating mesh (Issue #102) |
I will look at your data later, but if you're getting errors when running
through the examples (without changing anything), the problem is almost
certainly wrong package versions.
On Wed, Aug 7, 2024, 10:56 PM zhaoshaohua21 ***@***.***> wrote:
Thank you for your response. This issue was generated by performing
practical operations on your original Brahmaputra_Braided_River data. Now,
I am using my own data for the operations, but a new issue has arisen: the
skeleton obtained for the river does not match the original image. The
attached files include test.tif, which is my original mask, and
Cdm_channel_skel.tif, which is the skeleton image I obtained.
---- Replied Message ----
| From | Jon ***@***.***> |
| Date | 7/18/2024 20:09 |
| To | ***@***.***> |
| Cc | ***@***.***>,
***@***.***> |
| Subject | Re: [VeinsOfTheEarth/RivGraph] Error "Input vector should be
1-D" when generating mesh (Issue #102) |
Hi @zhaoshaohua21, this error almost certainly indicates that something is
wrong in your upstream processing, OR that the default parameters to
compute_mesh() are insufficient for your case. There is no way for us to
know without having a minimal, reproducible example to process ourselves.
Can you share the mask that you're processing so we can take a look?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub
<#102 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADRPO5OY3KQ6Y7YY7D5QGC3ZQLM4FAVCNFSM6AAAAABK4HVROGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZUHA2TOMBXGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, I'm trying to use RivGraph for River Examples. The issue I'm facing arises when I try to use the computer_mesh() function.
**>>> brahma.compute_mesh()
Generating mesh...
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\zsh.conda\envs\rivgraph_env\lib\site-packages\rivgraph\classes.py", line 856, in compute_mesh
self.meshlines, self.meshpolys, self.centerline_smooth = ru.valleyline_mesh(self.centerline, self.avg_chan_width, buf_halfwidth, grid_spacing, smoothing=smoothing)
File "C:\Users\zsh.conda\envs\rivgraph_env\lib\site-packages\rivgraph\rivers\river_utils.py", line 769, in valleyline_mesh
llines, lmap = iterative_cl_pt_mapping(cl2, bdists, 'left')
File "C:\Users\zsh.conda\envs\rivgraph_env\lib\site-packages\rivgraph\rivers\river_utils.py", line 608, in iterative_cl_pt_mapping
distance, path = fastdtw(Ao, An, dist=euclidean)
File "C:\Users\zsh.conda\envs\rivgraph_env\lib\site-packages\fastdtw\fastdtw.py", line 53, in fastdtw
return __fastdtw(x, y, radius, dist)
File "C:\Users\zsh.conda\envs\rivgraph_env\lib\site-packages\fastdtw\fastdtw.py", line 73, in __fastdtw
__fastdtw(x_shrinked, y_shrinked, radius=radius, dist=dist)
File "C:\Users\zsh.conda\envs\rivgraph_env\lib\site-packages\fastdtw\fastdtw.py", line 73, in __fastdtw
__fastdtw(x_shrinked, y_shrinked, radius=radius, dist=dist)
File "C:\Users\zsh.conda\envs\rivgraph_env\lib\site-packages\fastdtw\fastdtw.py", line 73, in __fastdtw
__fastdtw(x_shrinked, y_shrinked, radius=radius, dist=dist)
File "C:\Users\zsh.conda\envs\rivgraph_env\lib\site-packages\fastdtw\fastdtw.py", line 68, in __fastdtw
return dtw(x, y, dist=dist)
File "C:\Users\zsh.conda\envs\rivgraph_env\lib\site-packages\fastdtw\fastdtw.py", line 130, in dtw
return __dtw(x, y, None, dist)
File "C:\Users\zsh.conda\envs\rivgraph_env\lib\site-packages\fastdtw\fastdtw.py", line 141, in __dtw
dt = dist(x[i-1], y[j-1])
File "C:\Users\zsh.conda\envs\rivgraph_env\lib\site-packages\scipy\spatial\distance.py", line 520, in euclidean
return minkowski(u, v, p=2, w=w)
File "C:\Users\zsh.conda\envs\rivgraph_env\lib\site-packages\scipy\spatial\distance.py", line 463, in minkowski
u = _validate_vector(u)
File "C:\Users\zsh.conda\envs\rivgraph_env\lib\site-packages\scipy\spatial\distance.py", line 302, in _validate_vector
raise ValueError("Input vector should be 1-D.")
ValueError: Input vector should be 1-D.
The text was updated successfully, but these errors were encountered: