Questions tagged [pset4filter]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
1answer
5k views

Why does it not round up correctly?

So i'm doing filter and I noticed that its not rounding up correctly. // Convert image to grayscale void grayscale(int height, int width, RGBTRIPLE image[height][width]) { // Iterate over height ...
2
votes
1answer
62 views

pset4 - filter program,can't figure out what exactly is the problem with blur!

Can't figure out what the problem with this code is. It seems to be working correctly for corners, but for nothing else. Please help! void blur(int height, int width, RGBTRIPLE image[height][width]) { ...
1
vote
1answer
323 views

pset4 filter won't open file

Every time I try to compile my code to check grayscale, I put in the input they gave in the instructions: ./filter -g infile.bmp outfile.bmp But I keep getting this message saying Could not open ...
1
vote
1answer
441 views

helpers.c not compiling for filter

I am doing filter less comfortable in pset4. My filter file compiles fine, but helpers.c gives the following error : clang-7: error: linker command failed with exit code 1 (use -v to see invocation) ...
1
vote
1answer
57 views

pset4 - Green and Blue off in filter (less)

My code is here. void sepia(int height, int width, RGBTRIPLE image[height][width]) { for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { ...
1
vote
2answers
38 views

Blur only working with middle pixel

I've been stuck in this problem for a while, and the code only works when its inputted a middle pixel. Does anyone have a clue? I've searched everywhere for this particular issue, but I have only ...
1
vote
1answer
45 views

pset4 filter - only blurs the corners correctly

i can`t get the picture blurred at all (it comes out a complete mash up of colours blended together ...) ...i' ve been trying to figure this out for months now :(( HELP! void blur(int height, int ...
1
vote
1answer
316 views

pset 4 filter edge not working

I am having issues with my implementation of edges. I decided to make a 'border' around the edges of the image made up of zeros (did this in a copyImage array). I get correct outputs for some of the ...
1
vote
1answer
2k views

Pset4: Filter, Sepia, everything is fine except light blue

I have managed to get the sepia filter to work - almost. At first I was getting bright pink/magenta in the areas that were supposed to be white. I managed to fix that, but now I am left with some ...
0
votes
2answers
2k views

PSET4 Filter: Blur help

While trying to create an algorithm to come up with the average of the color for all nine pixels (if using 9) I realized I would need a way to see how many surrounding pixels are used in the ...
0
votes
1answer
2k views

Pset4: Filter, reflect values are off

The code seems to spit out a nice-looking reflected image, however, check50 says some of the values are not reflecting the way they should be. It's odd because it works for a 1x3 image and 3x3 image, ...
0
votes
1answer
44 views

Pset4 Filter sepia error from check50

below is my code for Pset4 filter(less). the code compiles fine, but I was getting these errors from check50. really appreciate if anyone can help. thanks :( sepia correctly filters single pixel ...
0
votes
2answers
53 views

Help with pset4 filter edge detection function

I have some problems with the edges function. The code compiles fine and all but the result looks like this: https://imgur.com/a/S2MQLom The edges of the image and one third of it don't look as ...
0
votes
1answer
38 views

Pset4 Reflect not working on 4x4 image

I get the eror only for the 4x4 image, the others are correct. Seems like the values are swapped between each other, but I cant find a way to fix it. Something in the inner loop (I think) is swapping ...
0
votes
1answer
131 views

pset4 Blur (Filter) not passing check50

following is my code for Blur. It works mathematically when I step through the loops for a given pixel using Tower, Yard, etc. But when running Check50, it fails every test except the corner test. ...
0
votes
1answer
250 views

pset4 filter - blur - runtime error, colors off

This is my first post; I hope I get the netiquette right. :-) I've been stuck on pset4 / filters / blur for days. The code compiles. When I run it through check50, these two points are correct: :) ...
0
votes
1answer
2k views

PSET 4 Filter(Less) help with Blur

The code visually seems to work (the images look blurry on the output) when I run it with all 4 of the pre loaded images, but with Check50 everything is marked as incorrect and I can't figure out why. ...
0
votes
1answer
35 views

Pset4 Im having issues with the blur filter

Im extremely close to solve this problem, this is the result of check50 :) helpers.c exists :) filter compiles :) grayscale correctly filters single pixel with whole number average :) grayscale ...
0
votes
1answer
17 views

Blur - I'm so close, but yet not 100%

Apologises for the long post: I wanted to be as explicit in my logic as possible The code I've written uses the following logic to box blur: Use nested for loop to access each pixel in image Check ...
0
votes
1answer
28 views

pset4 filter (more) edge not passing check50

this is my code for Edge, and it's not passing check50. below are the errors I got. any help is appreciated. :( edges correctly filters middle pixel expected "210 150 60\n", not "28 202 ...
0
votes
1answer
23 views

PSet 4 Filter(less) Sepia - Why is my output image slightly red tinted?

At first, I forgot to cap the RGB values at 255 for sepia, and it resulted in white pixels being blue. But other areas were fine(proper sepia). So additionally, I added the ternary operators to check ...
0
votes
1answer
12 views

cs50 pset4 grayfilter

Could someone explain me why there is a difference when you use float in front of image[i][j] compare to not using it. Because if I'm not mistaken, image[i][j].rgbtRed or the 2 others are already ...
0
votes
1answer
28 views

Pset4 Blur filter, loop for searching surrounding pixels

I'm trying to write the part of the code where the surrounding pixels around the main pixel are searched in order to make the average and later replace the main value for the average value. I am ...
0
votes
1answer
30 views

CS50 Problem Set 4 Filter (less comfortable) help

So I have been struggling to correct my code to fix the blur function of pset4 and feel that my code is correct (even if it isn't optimally efficient). Here's how I went about it: First I looped ...
0
votes
1answer
37 views

Cs50 Sepia properly coded

I did the sepia filter for the cs50 week 4 problem "filter) and although it works, I've been wondering, is there is not a more "proper" way to write the code, that is with out repeating ...
0
votes
1answer
49 views

Runtime error in pset4

I'm currently working on filter.c, and I'm struggling with the blur segment of it. I tried to write a code (I'm aware it's a mess of hard-code, but it's an attempt!), but I keep getting this error: ...
0
votes
1answer
52 views

CS50 Pset4 Filter (More comfortable) Edges Function

I am trying to code CS50's Pset4 Filter (More comfortable)'s edges function, but I keep on getting a different value. This is the link to the video explaining what I am trying to do in this function, ...
0
votes
1answer
100 views

Pset 4 Filter - Blur

My blur filter produces a decent looking blurred image and passes the Check50 corner pixel case. I define the cases for the edges and the middle pixels and then manually calculate the average RGB ...
0
votes
1answer
46 views

PSET4 Reflection Filter

I'm having trouble getting my head around the pointers needed for the reflection filter. I have got to here and can't get the syntax right. Any tips would be much appreciated. Thanks. void reflect(int ...
0
votes
1answer
57 views

PSET 4 BLUR and 2 of REFLECT

All of reflect works except reflected a 1 x 2 and a 4 x 4 (3x3 works fine) None of blur works except for when a point is in the corner, which makes little sense. I've sluthed around other answers and ...
0
votes
1answer
22 views

Pset4 less comfortable compile error

When I try to compile my helpers.c file the compiler shows me clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow helpers.c -...
0
votes
1answer
208 views

PSET 4 - Filter: Anyone able to help me on Edges?

I'm having a lot of trouble figuring out how my code for edges is failing so badly every time. Any help on this would be greatly appreciated! Here is what I'm getting back from check50: :( edges ...
0
votes
1answer
49 views

Pset4 less comfortable errors!

i just finished Week 4's Lecture and started working on the "Feeling Less Comfortable" Filter project. The issue is that I wanted to see how well everything worked before I went on to submit it and ...
0
votes
1answer
108 views

PSET4 FILTER(LESS) BLUR HELP!

I'm struggling to figure out exactly what's wrong with the code since I think it mathematically checks out and covers every possibility of an image. Please do take a look at my code and maybe you'll ...
0
votes
2answers
213 views

PSET 4 Errors: where did I go wrong?

So after being stuck on this pset for overlooking tiny typos I have finally gotten it to compile but I received more errors then I would like to have. If anyone could tell me where I can find the ...
0
votes
1answer
66 views

Edge detection produces weird outputs

I've been stuck on this for the past while and I'm not sure what's wrong in my algorithm. I get complete nonsense for outputs and I'm kind of lost on where to go from here. Any help would be ...
0
votes
1answer
48 views

PSET4 - Filter edge too yellow

folks! I'm working on the edge detection algorithm, but for some reason, the image is turning out too yellow. I wonder if someone can give me some sort of hint at what I'm doing wrong, since I haven'...
0
votes
3answers
39 views

Blur works visually, but check50 reads errors for every section

I know that the edges and corners are supposed to read errors, because I haven't fixed them yet. What I don't understand is why check50 reads errors for middle pixels. // Blur image void blur(int ...
0
votes
2answers
297 views

PSET 4 filter less comfortable (blur filter) help

Struggling with making the blur filter function for filter(less comfortable): When i try to run the program with the input and output file i get the errors marked by the asterisk (*) on line 26,27,28....
0
votes
1answer
62 views

pset4 Filter Reflect could anyone check my code, I can't find the error as to why it does not output desirably

// Reflect image horizontally void reflect(int height, int width, RGBTRIPLE image[height][width]) { int t[3]; // using temporary array to swap values for(int i=0;i<height-1;i++) // loop thru ...
0
votes
1answer
258 views

CS50 Blur issue

void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE holder[height][width]; int red; int green; int blue; float counter; for (int i = 0; i < height; i++) { for (int j ...
0
votes
1answer
105 views

Blur error in CS50 problem set 4 — filter_less

I have been trying to figure out the error for hours long and still no success, it'll mean a lot to me if someone can tell me what is the error in this code in order to apply a blur filter. I ...
0
votes
1answer
295 views

Filter - Blur Function Correct?

My blur function looks like it is working when I output files and it passes check50 on everything except the last two checks. Looking at the message below, it appears my values are correct ( "70 85 95)...
0
votes
1answer
216 views

Problem Set 4 - Filter (Blur)

I know its pretty lame and uninspired to hard-code each and every special case of the blur function, but somehow it still refuses to pass most of check50's tests (aside from the middle and edge pixel ...
0
votes
1answer
294 views

CS50 PSET4 Grayscale

Can anyone explain why we do not have to use a pointer for the new grayscale value? Whenever I tried : int *average = average of the colors *blue = &average ... etc It would error out. ...
0
votes
1answer
218 views

rounding problems with blur function - pset4 2020, filter less

I´m stuck in this two problems in Blur function that according to check 50 has to do with rounding issues, or maybe something more. I´ll appreciate your attention and support. Thank you. Here are the ...
0
votes
1answer
104 views

valgrind on filter -r. No leaks but errors

I am working on pset4 filter -r (reflection). How I want to achieve reflection: Reserve space in memory, enough to fit an image. Name it image-copy. Copy 1-to-1 the original file there. Original ...
0
votes
2answers
22 views

Pset4 Blur (filter less) not passing check50

As title says, I am not passing check50 for blur. I am aware that my method is probably extremely tedious and not the best method, but I came up with it myself and would like to find out why it isn't ...
0
votes
1answer
19 views

PSET4 Filter (Less) Sepia

:( sepia correctly filters simple 3x3 image expected "100 89 69\n100...", not "100 89 69\n100..." :( sepia correctly filters more complex 3x3 image expected "25 22 17\...
0
votes
1answer
26 views

pset4 filter Invalid or Unsupported Image Format

I have an issue with the pset4 filter, I've applied grayscale filter and sepia filter and they are working already, but when I started to write a code for reflect filter and try to compile then ...