Skip to content
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

Question about how merge patchs work #11

Open
bisnow33 opened this issue Apr 27, 2023 · 0 comments
Open

Question about how merge patchs work #11

bisnow33 opened this issue Apr 27, 2023 · 0 comments

Comments

@bisnow33
Copy link

Hi,
Thank for your nice work !
I have a question about how you compute the average in the merge_patchs function. I'm not sure to understand how you proceed when I look at your code. In those following lines you sum value of different patches rigth ? and why you divide value by 2 ? :

elif dims == 4:
                    if rgb:
                        empty_data[indice[0]:indice[1], indice[2]:indice[3], :] = np.where(empty_data[indice[0]:indice[1], indice[2]:indice[3], :] == 0,
                                                                                            data_patches[i], 
                                                                                            np.add(data_patches[i],empty_data[indice[0]:indice[1], indice[2]:indice[3], :])/2)

If I'm after the sum where do you divide by the number of by the number of occurrences ?

Best,

Tristan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant