Skip to content

Segmentation#61

Merged
QuentinAM merged 19 commits intodevelopfrom
segmentation81
Oct 24, 2021
Merged

Segmentation#61
QuentinAM merged 19 commits intodevelopfrom
segmentation81

Conversation

@Ronan-pdr
Copy link
Copy Markdown
Contributor

  • Split the width and height in 9
  • 81 blocks of 28 x 28 pixels in a SDL_Surface* array
  • Only the number there is a clean of the black lines

@Ronan-pdr
Copy link
Copy Markdown
Contributor Author

AHAHAH I can not make the changes here ...

@Renaud-Dov Renaud-Dov added this to the Soutenance Intermediaire milestone Oct 23, 2021
@Ronan-pdr
Copy link
Copy Markdown
Contributor Author

@QuentinAM the function to use for segmentation is in split9, @Renaud-Dov is going to the shower so he cant review. If u want to do it feel free.

@Renaud-Dov
Copy link
Copy Markdown
Contributor

you don't need to talk about my personal life on a GitHub review 👀

Comment thread include/Imagery/Segmentation/split.h Outdated
if (nbblack == 0)
return 1;
// printf("sur la colone %d il y a %d block noir\n",x,nbblack);
return nbblack > 20 ? 1 : 0;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to delete all commented printf in french !!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/Imagery/Segmentation/clearsquare.c Outdated
for(unsigned int i = 0; i < 56; i++){
printf("%d,",cor[i]);
}
printf("]\n");*/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/Imagery/Segmentation/split.c Outdated

SDL_Rect block;
unsigned int yinit = coorarray[0].ystart;
const unsigned int ytaille = coorarray[0].yend - coorarray[0].ystart;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable in french

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/Imagery/Segmentation/split.c Outdated
printf("je suis la\n");

resize(&imagebis, 28, 28);
printf("Apres resize widthnew: %d, heightnew: %d\n", imagebis.width,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of useless print + one in french

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/Imagery/Segmentation/split.c Outdated

if (save)
{
printf("je save ta mère\n");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Print in french

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/Imagery/Utils/image.c
image->height = height;

image->pixels = malloc((width + 1) * sizeof(Pixel *));
image->pixels = calloc(width, sizeof(Pixel *));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why replace this by a calloc ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Paul had advised to do this when I had memory problems this morning, moreover he advised us when he helped Matthew to always use calloc when we can and not malloc

@Ronan-pdr Ronan-pdr closed this Oct 23, 2021
@Ronan-pdr Ronan-pdr deleted the segmentation81 branch October 23, 2021 23:01
@Ronan-pdr Ronan-pdr restored the segmentation81 branch October 23, 2021 23:07
@Ronan-pdr Ronan-pdr reopened this Oct 23, 2021
Copy link
Copy Markdown
Contributor

@Renaud-Dov Renaud-Dov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@QuentinAM QuentinAM merged commit 61322a4 into develop Oct 24, 2021
@Ronan-pdr Ronan-pdr deleted the segmentation81 branch November 3, 2021 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants