flowchart LR
A[启动软件] --> B[用户交互界面]
B --> C[上传图片按钮]
C --> D{选择图片}
D -->|成功| E[显示在“处理前的图片”区域]
D -->|失败| B
E --> F[功能选择按钮]
F --> G{选择处理功能}
G -->|模糊图像| H[使用中值滤波,卷积核大小较大]
G -->|增加噪声| I[增加椒盐噪声,比例默认为2%]
G -->|去除噪声| J[使用中值滤波,卷积核大小较小]
G -->|边缘检测| K[使用Laplace算子边缘检测]
G -->|频域分析| L[显示离散傅里叶变换图像]
G -->|二值图像| M[默认以127为阈值转换为二值图像]
G -->|负片图像| N[灰度图像每个像素值用255减]
H & I & J & K & L & M & N --> O[显示在“处理后的图片”区域]
O --> P{继续操作?}
P -->|是| B
P -->|否| Q[退出软件]
style A fill:#fff,stroke:#333,stroke-width:2px
style B fill:#fff,stroke:#333,stroke-width:2px
style C fill:#fff,stroke:#333,stroke-width:2px
style D fill:#fff,stroke:#333,stroke-width:2px
style E fill:#fff,stroke:#333,stroke-width:2px
style F fill:#fff,stroke:#333,stroke-width:2px
style G fill:#fff,stroke:#333,stroke-width:2px
style H fill:#fff,stroke:#333,stroke-width:2px
style I fill:#fff,stroke:#333,stroke-width:2px
style J fill:#fff,stroke:#333,stroke-width:2px
style K fill:#fff,stroke:#333,stroke-width:2px
style L fill:#fff,stroke:#333,stroke-width:2px
style M fill:#fff,stroke:#333,stroke-width:2px
style N fill:#fff,stroke:#333,stroke-width:2px
style O fill:#fff,stroke:#333,stroke-width:2px
style P fill:#fff,stroke:#333,stroke-width:2px
style Q fill:#fff,stroke:#333,stroke-width:2px