Questions tagged [filter]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
7 views

The sepia code passes 2 first tests but doesn't pass the rest of those tests. What am I doing wrong?

This is the code I have written but it fails to produce the intended result. I am really not able to figure out why it's wrong. Can somebody help me? [snip] if (image[i][j].rgbtRed > 255) { ...
0
votes
1answer
17 views

CS50 - PSET 4 - Filter - Edges

//Pixel buffer RGBTRIPLE pixelBuffer[height][width]; //Iterates on every pixel and calculates Gx and Gy for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++)...
0
votes
1answer
27 views

pset4 filter. Blur image compiles goed but does'nt pass the check50 lots of error

The code in helpers.c all images compiles exept for the Blur image it compiles without any errors. But doesn't pass the cs50 check? any suggestions only the Blur image section. Thanks // Blur ...
0
votes
2answers
21 views

pset4 filter Could not open infile.bmp

I compiled the grayscale image in helpers.c with make filter without any errors correctly and check50 also correctly and passes all creterea But when I enter [ ./filter -g infile.bmp outfile.bmp ] it ...
0
votes
0answers
29 views

Pset4 - Filter - Blur- some pixels have RGB 0 0 0

I've been struggling with the filter portion of problem set 4 for quite a while. In particular, I've had a particularly persistent bug. As you can see from the Check50 screenshot below, some RGB ...
0
votes
2answers
33 views

Blur PSet4 (Filter) - Compilation errors passing reference to the image[height][width] array in helper function using pointers

I'm having a brainfart wrapping my head around the use of pointers when trying to pass a reference to the image 2D array in a helper function that I created to assist in the blur effect. Here's blur: ...
0
votes
1answer
28 views

PSET4 Blur not passing Check50

My code seems to work (when visually inspecting output files), but Check50 does not pass it. I'm struggling to understand what is causing this issue despite having repeatedly read over the code and ...
0
votes
1answer
25 views

Check50 shows errors on Blur Function, Filter even though images are blurred

My blur function seems to be working when I input the sample images and open the output file but check50 shows 4/5 errors :( blur correctly filters middle pixel expected "127 140 149\n", not ...
1
vote
1answer
26 views

I am asking about pset4. What is the importance of creating a header file like helpers.h?

I am confused about the usage of helpers.h and declaring the functions in it. As I can from the beginning include the bmp.h in the helpers.c and create the functions in the helpers.c.
0
votes
1answer
36 views

Pset4 filter blur corner

I finished the other filters and just the blur filter is giving errors. The errors are the following: :) blur correctly filters pixel on edge :( blur correctly filters pixel in corner expected &...
0
votes
1answer
30 views

I don't know what I'm doing wrong Pset4 filter “edges”

I can't get edges to work I would really like some hints to what's wrong with my code. // Detect edges void edges(int height, int width, RGBTRIPLE image[height][width]) { //copying original image ...
1
vote
1answer
44 views

PSET4 — Filter (more) — Edges Error

I'm currently working through the filter problem, and I'm not sure why it's not working on the pixels on the edge (it also seems to only be incorrect on the B value in RGB). This is the message I'm ...
0
votes
1answer
19 views

My blur function blurs every image, but fails every check50 check - please help!

I'd really appreciate any help that can be offered here. My code seems to output a blurred image perfectly, but fails every check50 check and I can't work out why... void blur(int height, int width, ...
0
votes
1answer
22 views

Pset 4 - Filter - Edge detection

My function kind of works but the result is too white. I saw some people having the same issue because they didn't store the new pixels in a temporary image, but I already did that. void edges(int ...
0
votes
1answer
29 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
0answers
16 views

PSET 4 - Blur - IF Statement

I can't seem to understand why the if-statement doesn't work to filter out the cells outside of the image's rows/columns. see the full code below, I left out the part where I copy it back into the ...
0
votes
0answers
12 views

I keep getting the error: linker command failed with exit code 1 (use -v to see invocation) when I'm compiling my code for filter: blur in ide

I seem to get this error over and over again when i compile my code for filter: blur by typing "make helpers". I don't know if it's because of my code. This error did not appear when I ...
0
votes
1answer
35 views

pset4/filter: What is being instantiated with RGBTRIPLE(*image)[width]

I'm struggling to get my head around what is being instantiated here with (*image) (and what to do with it) in this line: RGBTRIPLE(*image)[width] = calloc(height, width * sizeof(RGBTRIPLE)); I ...
0
votes
1answer
27 views

Some values in my 'edges' don't pass check50

the rightmost values in the matrix in check50 is wrong but the other values are correct. I'm not really sure what's wrong. code: void edges(int height, int width, RGBTRIPLE image[height][width]) { ...
0
votes
0answers
18 views

Help with PSet 4 Filter (More) Edge

I've been stuck on the Edge part of Filter (More) for a few days now. Check50 tells me that none of the pixels return the right values but I can't seem to find any problem with the code. Here's my ...
0
votes
1answer
18 views

Not getting the edge function to work

Please find my code for the edge function below, I'm getting all errors on check50 but can't understand what's wrong. // Detect edges void edges(int height, int width, RGBTRIPLE image[height][width]) {...
0
votes
1answer
43 views

Problem Set 4 Blur — incorrect output

I am currently working at the blur filter. While the other task were pretty easy, this one ist very much difficult. I have spend hours looking for the mistake - but without success, I tried to do it ...
0
votes
1answer
40 views

Need help solving blur with c

Code: void blur(int height, int width, RGBTRIPLE image[height][width]) { //temporary image to swap RGBTRIPLE temp_img[height][width]; for (int g = 0; g < height; g++) { for (int h = 0; h < ...
0
votes
0answers
28 views

check50 is not working with pset4 filter

I've been trying to check problemset4 filter-less but check50 is not working The username and password is correct and I have visited submit.cs50.io as the message says and I was logged in there but ...
0
votes
2answers
64 views

Pset4, the first problem “Filter”. How can I define the grayscale function recursively?

I have a question about problem 4, assignment 1 Filter, where we have to define the grayscale function. So it is actually not difficult to define this function with a loop in a loop. But I am trying ...
0
votes
2answers
49 views

What's my error?

I am having some errors with my code in check50. All of my code is on this gist. Grayscale - expected "28 28 28\n", not "27 27 27\n" in without whole number average. I am using ...
0
votes
0answers
15 views

edges seem to work fine when i use it, but check 50 says it's all wrong

So here is my code. Not the best one, but I wrote it without any help and it work. At least i think so when i look at the output images. But check50 says it is wrong. My only thought is that i decided ...
0
votes
1answer
29 views

Pset4Ffilter - Starting Off

I'm doing the pset4 filter (less comfortable),but I just don't know where to start. Can someone pleases give me some starting off tips?
0
votes
0answers
15 views

Only the first test passed for Edges (Filter, more comfortable)

I have been staring at Edges for a whole day, still can't find out what's wrong with it. The test says the middle pixel is correctly calculated. but edges, corners, 3X3....no go. Anybody can offer a ...
0
votes
0answers
43 views

Problem with filter (pset 4): Blur and edge

All the filters on the filter program work well, but check50 is giving me a few errors, which I think, is due to rounding issues. But, I have checked and re-checked the code for those errors, and ...
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
46 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 ...
0
votes
0answers
20 views

CS50 filter more edge

I've been stuck for hours trying to solve this, so I would appreciate someones help lol So my edges filter is only passing the test for the middle pixel: I can't figure out what is wrong with my code ...
0
votes
0answers
7 views

Edge detection Program Gives Undesired Output

I have been struggling with the edge detection program. It produces weird output!!! The code is as given below: void edges(int height, int width, RGBTRIPLE image[height][width]) { float avgRedGx, ...
0
votes
1answer
26 views

Filter(less) Blur is all but correct for 1 or 2 values

I've been looking through the similar questions and they don't really help me. I clicked the link to see the results and double checked my code but it just doesn't seem to want to work. Here's my code:...
0
votes
0answers
12 views

i started doing pset4, managed to get edges to work but green is always off, can someone please help me find out what i did wrong

int cap (int value) { return value < 255 ? value: 255; } RGBTRIPLE get_edge(int i, int j, int height, int width, RGBTRIPLE image[height][width]) { int Gx[3][3] = {{ -1, 0, 1}, {-2, 0, 2}, {...
0
votes
1answer
63 views

Need help with pset4 filter blur

Getting close on pset4 filter (less) but getting hung up with the following errors for the blur function. Anyone able to see what I am doing wrong? Would welcome any advice. Here are the errors I am ...
0
votes
1answer
40 views

PSET filter reflect

Reflects sort of works, but when running cs50 check the message: :( reflect correctly filters 1x2 image expected "0 0 255\n255 0...", not "0 0 255\n0 0 2..." :( reflect ...
0
votes
1answer
48 views

cs50 Pset 4 filter:Greyscale. Cade is not averaging correctly?

So I am a little stuck on the Greyscale protion of the Pset4. I have the code in place as follows... void grayscale(int height, int width, RGBTRIPLE image[height][width]) { for (int i = 0; i < ...
2
votes
1answer
65 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]) { ...
0
votes
0answers
17 views

Trouble with Blurring my Image Pset4… Running out of Bounds

I am trying to blur my image but I am running into trouble. First of all, the issue is that I run out of bounds - because I did not account for edges and corners here. Is there a simple fix - like ...
0
votes
1answer
87 views

Pset4 Reflect Filter Challenges - Not Reflecting

I am working on reflecting this image. I think I got the logic correctly, but I am not positive about that. However, my image did not reflect. Is this because I need to use malloc? I tried to but ...
0
votes
1answer
56 views

Pset 4 Blur Filter Program Seems to Compile but Doesn't Output Anything and Check50 Reads Errors

I am having trouble with the blur function. I am not given any error messages when I run the program, and it creates an output image as if the blurring is working. However, when I open the output ...
0
votes
1answer
79 views

pset4 filter/blur code problem

I have written code for the blur filter in problem set 4. The code compiles and runs fine and seems to blur the image but when I run check50 it says that the RGB values aren't correct. I have looked ...
0
votes
0answers
47 views

Pset4 Filter: Blur Issue

So this is my first time using Stack Exchange, I have been relying on reddit so far for cs50 however I am stuck on blur. Someone on reddit told me I have to "create a temporary container that is ...
0
votes
1answer
69 views

Help on blur function. Correct logic but wont work

So after I passed pset3, I thought things would go easier since my friend said that filter wasn't as complicated as Tideman. Now, I’m doing the blur filter part and stuck on its computation especially ...
0
votes
0answers
95 views

FILTER WORKS FINE, BUT BLUR FAILS 3x3 and 4x4

The code works fine, but it fails blur filters a 3x3 and 4x4 image. I would like a help on why it correctly blur a middle pixel, but fails those two. Apparently, the wrong pixels are either on edge (...
0
votes
0answers
44 views

Trouble filtering center pixels in pset4 filter blur

I am SO close on reflect but am still getting a few final errors. My code for pixels on the edge and in the corners seems to work fine. However, there is an issue with my code on the center pixels and ...
0
votes
1answer
85 views

pset4 Filter (more) Edge Detection help

void edges(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE copy[height][width]; for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) {...
0
votes
1answer
38 views

Pset4: filter greyscale UndefinedBehaviorSanitizer (not due to incorrect order of height and width)

I've seen all the other questions and answers regarding this specific error. Thankfully, or not so, my error was not due to the order in which I looped through the image. Here's my code: void ...